+ 2
can this be used for user inputs
5 Answers
+ 3
yes of course .
ex:
Scanner scanner=new Scanner(System.in);
String name=scanner.nextLine();
if(name.exualsToIgnoreCase("bayram"))
System.out.println("welcome Bayram");
else
System.out.println("nice to meet you"+name);
+ 1
yes of course u can.
For examle
Scanner sc = new Scanner(System. in) ;
System. out. print("Enter a value :") ;
int value = sc. nextInt() ;
if (value<0)
System. out. println("Please enter a positive number. ") ;
0
what does it mean
0
can I use the if condition for scanner variables( input from the user)
0
Yes u can