Answer to Question #279254 in Java | JSP | JSF for Candy

Question #279254

How can I Write a Java programming

1.ask the use input the username

2.input the name in next line


and it can be content the student class

System.out.println(|Student Name : |)


use “ SList [i] getStudentname “

and display after the Student Name : Ada Sze


hins:

use for loop

do

while

else




1
Expert's answer
2021-12-13T13:45:45-0500


import java.util.Scanner;


public class App {


	/**
	 * The start point of the program
	 * 
	 * @param args
	 * 
	 */
	public static void main(String[] args) {


		Scanner keyBoard = new Scanner(System.in);


		for (int i = 0; i < 5; i++) {
			System.out.print("Enter username: ");
			String username = keyBoard.nextLine();
			System.out.print("Enter name : ");
			String name = keyBoard.nextLine();


			System.out.println("Student username: " + username);
			System.out.println("Student Name: " + name);
		}


		keyBoard.close();
	}
}

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