Answer to Question #233660 in Java | JSP | JSF for Selma Shigwedha

Question #233660
Using the main functions. Create a program that takes in a student name, their home town and student number then print out the following message:
Sample run 1:
Java lab01_task03 Late Rehoboth 219100001
Output: "Hi Kate, your student number I 219100001 and how is Rehoboth?"
1
Expert's answer
2021-09-06T00:16:42-0400
import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		String student_name, home_town;
		int student_number;
		System.out.println("Enter the name of the student: ");
		student_name=in.next();
		System.out.println("Enter home town of the student: ");
		home_town=in.next();
		System.out.println("Enter student number: ");
		student_number=in.nextInt();
		
		System.out.println("Hi "+student_name+" ,your student number is "+student_number+" and how is "+home_town+"?");
	
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS