Monday, 10 August 2015

Java Problem


import java.util.scanner;

public class helloworld {
public static void main(string[] args) {
scanner keyboard = new scanner(system.in);
system.out.println("choose number between 1 , 10");
if (keyboard == 1) { system.out.println("you correct");
} else system.out.println("sorry try again");
}
}


says can not have (keyboard == 1) tried declare keyboard int received error how make if types 1 on keyboard run command?
 



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