print name and age using by Scanner | | print the age and name in java program

Published: 16 March 2022
on channel: STUDY PATHSALA
824
6

hlw everyone
I am Lokesh. Welcome to our youtube channel"Mirganj Study"

About this video:
this video is help you to print the name and age from user * hiw to use Scanner class*

// Accept the User's name, age and print in following manner
// Ex - Hello pintu, you are 12 years old.
public class Ques3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the your name:");
String name = sc.nextLine();
System.out.println("Enter your age");
int age = sc.nextInt();
System.out.println("Hello "+name+" , you are "+age+" years old");
}
}




Queries Solved:




Let's start your preparation with Mirganj Study
Visit playlist of Chemistry:
Visit playlist of Maths:

Subscribe my channel #Mirganj_Study
If you guys support this channel then we will also provide Full tutorial videos of class 10th and 12th Maths,Physics and Chemistry.
And also upload Programming videos of C,C++,java,python and all other programming language with basics . AND also provide notes of all related videos on this channel.

Some other Social links:
Visit my


On this page of the site you can watch the video online print name and age using by Scanner | | print the age and name in java program with a duration of hours minute second in good quality, which was uploaded by the user STUDY PATHSALA 16 March 2022, share the link with friends and acquaintances, this video has already been watched 824 times on youtube and it was liked by 6 viewers. Enjoy your viewing!