Muhamed Senyonjo

Greenhorn
+ Follow
since Mar 13, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Muhamed Senyonjo

Thanks i got it....

I used

BufferedReader br = new
BufferedReader(new InputStreamReader(System.in));

String name;

System.out.println("what is your name");
name = br.readLine(); // used the readline to read the input from the BufferedReader

System.out.println("Your name is " + name);

Thanks for your help
13 years ago
Do we need to cast the StringBuffer into String and then access the scanner class using the casted string refrence;
13 years ago
is their any way i can get user input using the StringBuffer object?

i can usually do it using the scanner class...

Scanner keyboard = new Scanner(System.in)
string name;

System.out.println("what is your name");
name = keyboard.next();

i would like to do the same with stringbuffer.

Thanks for your help.
13 years ago