Introduction: Programming Lesson 5
Today I decided to do java and some harder batch. The programming we will learn today is player input we will start with java input.
Step 1:
first thing we need to know is that java is not object oriented programming so to program with it we need to import something.
this something is shown below.
import java.util.Scanner;
public class hipacman {
public static void main(String[] args) {
This is how it should look.
this something is shown below.
import java.util.Scanner;
public class hipacman {
public static void main(String[] args) {
This is how it should look.
Step 2:
The next step is to get input now that you have imported the scanner. To get input you must make a new scanner the scanner can be made like this.
input = new Scanner(System.in);
String instructs = input.next();
System.out.println(instructs);
input.close();
This code will make a scanner. that copies something that the player writes.
input = new Scanner(System.in);
String instructs = input.next();
System.out.println(instructs);
input.close();
This code will make a scanner. that copies something that the player writes.
Step 3: Batch Input
to get batch input the code below is used.
set /p input=(anything you want)
set /p input=(anything you want)
Step 4:
to make a very simple batch input copier you would use this code.
set/p input=enter
if %input% == %input% echo %input%
this code would mean if the input was input write the input an easier way is to write this
set /p input=enter
echo %input%
(remmember) pause;
hope you liked it
please fav,follow and subscribe to my youtube channel.
set/p input=enter
if %input% == %input% echo %input%
this code would mean if the input was input write the input an easier way is to write this
set /p input=enter
echo %input%
(remmember) pause;
hope you liked it
please fav,follow and subscribe to my youtube channel.
Step 5: Java Programming Video
Step 6: Batch Input Video
please subscribe to my youtube channel.link:http://www.youtube.com/channel/UCwc6nYCOwF-e83hj3f_D_2Q?feature=watch