Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Write Java statements to accomplish each of the following a) To dedlare variables rall and val? to be of int type. b) To assign

image text in transcribed
1) Write Java statements to accomplish each of the following a) To dedlare variables rall and val? to be of int type. b) To assign the number 25.5 to the variable cost c) To display the line of textWelcome To Java" on the screen. d) To obtain a value from the user (keyboard) and store in a variable named val e) To increase the values of the variable num I by 10. fl To create a string object named country and assign the string United States of America g) To compute and display the value of the expression Y. 6 for Y- 5.65 h) To multiply the values of the variables length and width and to store the product in the variable named area. To display the number of characters of the string stored in city 2) Write the output of the following java program segments a) int.a, b-28 b) double y 1.5 +3 7/2-1; System.out printinl The value is it y) a-2+5/3-1; System.out.println a. "t+b+ in"+c c) int a, b, G c-(3+5)%3-2.5; d) String age; 1opson Fane.Show aputDalosf What i your name?): f System.out,print(" Programming is fun. " System.out.print" Jara is more fun.n) System.out.println("After this course" mternout,println("I will learn C."); g) If the following Java statements are executed, what will be displayed? Systen.out.printin ("The top three winners aren") veten.eut.eEiE( Jody, the GiantVa vaten.eHE RESDE(Buffy, the Barbarian) Svetem.out printin ("Adelle, the Alligator") S) Which of the following is not a primitive data type? a Short b. Long c.Float d. String input-NetB...W One Rev

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_2

Step: 3

blur-text-image_3

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 International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions