- 1
how do i make a string holding another var
I receive a user input that needs to be a string kinda like this int for example int ageNumber = age.nextInt();
3 Answers
0
Above public class UwU just write
import java.util.*;
Or
import java .util.Scanner;
- 1
String name =sc.nextLine()
This is used for taking String inputs in java
- 1
public class UwU
{
public static void main(String[] args){
Scanner email = new Scanner(System.in);
String Emailinfo = email.nextLine();
System.out.println(Emailinfo);
}
}
still getting errors