Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CH 4 Worksheet 1. Study Math.ceil, Math.floor, Math.rint, Math.round function. 2. Circle the possible output from Math.randomO. 5.42 0.99 1.0 0.0 3. What is the

image text in transcribed

CH 4 Worksheet 1. Study Math.ceil, Math.floor, Math.rint, Math.round function. 2. Circle the possible output from Math.randomO. 5.42 0.99 1.0 0.0" 3. What is the output from System.out.printin(int)Math.random)) 9? 4. What is the output from System.out.printin((int)(Math.randomO"9))? 5 6. "bear".compareTo ("dear") returns 7. The statement ("New York".compareTo("New Year") >0) returns 8. String message Welcome to Java"; String message message.substring(0,11) +"HTML; message becomes 9. The statement String sl-"Hello" +"World!"; sl becomes 10.The statement String s2- "Chapter" + 2; s2 becomes 11.The statement String s3 "Supplement" + 'B'; s3 becomes 12.System.out.println("i +j is 2+3) outputs 13.System.out.printin("i + jis"+(2+3)) outputs 14. The 15. The statements String b "B"; System.out.println(b + 3); outputs statement char a 'A; System.out.println(a +3); outputs *When a string adds with a number, the number is converted into a string *When a character adds with a number, the character is converted into an int. 16.The statements String s "college", char x-s.charAt(7); outputs 17. The statement System.out.printf("%3d",98765) Outputs 18. The statement System.out.printf("%8s",78) outputs 19. The statement System.out.printf("%2. I f,43.78) outputs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago