Java Tutorial #3 || User Input and Libraries || Code nagar

Pubblicato il: 12 novembre 2021
sul canale di: Code Nagar
11
1

Hi guys need some resources ?!:
here are the codes boiss and girlsss!!:

// always import outside the class

import java.util.Scanner; // our import

public class Tut3 {

public static void main(String[] args) {

// lets make a instance of Scanner , means input
Scanner scan = new Scanner(System.in); // you can name it anything
System.out.print("Whats your NAME : "); // We will ask for the users name
String name = scan.nextLine(); // because its string we use nextLine() , in integer we use nextInt() , so on....
// So it printed my name , means its working lets ask for age
System.out.print("Enter your age : ");
int age = scan.nextInt();

System.out.print("Enter your height : ");
double height = scan.nextDouble();
// Lets print it !!!😀😀
System.out.println("Hello ,"+name+" ,you are "+age+"years old ,and height is "+height);
// pretty interesting huh!!



}
}


In questa pagina del sito puoi guardare il video online Java Tutorial #3 || User Input and Libraries || Code nagar della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Code Nagar 12 novembre 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 11 volte e gli è piaciuto 1 spettatori. Buona visione!