Sunday, 11 January 2015

annoying Java compiling issue.


code:
import java.util.scanner;  public class pizzastore { 	public static void main(string[]args) 		{ 			scanner console = new scanner (system.in); 			 			string day; 			 			 			 			system.out.println ("what day of week it?"); 			day= console.nextstring (); 		} }//end public class  


when go compile error(

code:
pizzastore.java:14: cannot find symbol symbol  : method nextstring() location: class java.util.scanner 			day= console.nextstring (); )
i have same code in program use (except fact type int instead) , works fine. because of string. don't know , plain annoying. can explain why is?
 



Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment