Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

determining an input's data type  RSS feed

 
Teresa Juan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am a beginner in java.. can someone please help.. here's d problem
--> i need 10 input.. the program needs to determine wheather each input is a string, char, int or a real number..
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this a school assignment?
In any case, you're not giving enough details. "Inputs" on the command line are considered to be an array of Strings.
Every Java program has to have the following main method:
public static void main (String [] args) {
}
The variable "args" will contain everything following MyProgram below:
java MyProgram input1 input2 input3
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!