What is the result of the following code? System.out.println, question help

Computer Science
Tutor: None Selected Time limit: 1 Day

What is the result of the following code? Explain.


System.out.println ("Here we go!");

System.out.println ();

System.out.print ("You could always run this in Java to double check your answer.");

System.out.println ("12345");

System.out.print ("Another.");

System.out.println ("Finally done.");

Jan 18th, 2016

Thank you for the opportunity to help you with your question!

 public static void main (String[] args){
        int result = 3;
        System.out.println(result);

        result -= 1; // result is now 2
        System.out.println(result);

        result *= 2; // result is now 4
        System.out.println(result);

        result /= 2; // result is now 2
        System.out.println(result);

        result += 8; // result is now 10
        result %= 7; // result is now 3
        System.out.println(result);

    }
}

Please let me know if you need any clarification. I'm always happy to answer your questions.
Jan 18th, 2016

What??

Jan 18th, 2016

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
Jan 18th, 2016
...
Jan 18th, 2016
Dec 7th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer