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

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Jan 18th, 2016
...
Jan 18th, 2016
Mar 29th, 2017
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