- 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();

5th Feb 2021, 4:38 PM
27Cameron Fountain
3 Answers
0
Above public class UwU just write import java.util.*; Or import java .util.Scanner;
5th Feb 2021, 6:26 PM
Atul [Inactive]
- 1
String name =sc.nextLine() This is used for taking String inputs in java
5th Feb 2021, 4:56 PM
Atul [Inactive]
- 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
5th Feb 2021, 5:51 PM
27Cameron Fountain