Search:

Type: Posts; User: Hemu

Search: Search took 0.29 seconds.

  1. Replies
    2
    Views
    848

    Help! What is wrong with this code?

    Scanner console = new Scanner(System.in);
    System.out.print("Type a number: ");
    int number = console.nextInt();
    if (number % 2 == 0 && number % 3 == 0) {
    System.out.println("Divisible by...
  2. What is wrong with my code? Need Help! ASAP Thank you

    Scanner console = new Scanner(System.in);
    System.out.print("What is your favorite color? ");
    String name = console.next();
    if (name == "blue") {
    if (name.equals("blue")) {
    ...
Results 1 to 2 of 2