Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Stupid java question

Name: Anonymous 2009-11-22 6:21

Yes I know I should be programming in Lisp. Yes java sucks. I'm a noob. OK.

I just want to know, how do I read a String from Scanner?
Like suppose I have

Scanner keyboard = new keyboard(System.in);
System.out.println("What is yo name?");
//Is it something like
//String name = keyboard.nextString ?
I've only ever used scanner for numbers so I'm a bit lost here.

Name: Anonymous 2009-11-22 20:16

nextInt - Next integer
next - next characters entered until there is a space
nextLn - Entire line

These are basics that I have picked up in college in about two weeks of learning.

As for lisp being better. Someone always says another language is better, always. Every year we do another language and there's always a better one we should be doing.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List