Question: With the following variables declared and initialized... double dVar1 = 25.0, dVar2 = 2.5; int iVar1 = 15, iVar2 = 30; String s1 = hi,

With the following variables declared and initialized...

double dVar1 = 25.0, dVar2 = 2.5; int iVar1 = 15, iVar2 = 30; String s1 = "hi", s2 = "there";

...show what is printed for at least 5 of the 6 following statements:

a) System.out.println( (iVar1/iVar2) > (iVar2%iVar1) );

b) System.out.println( s2.length() + s1 + dVar2 );

c) System.out.println( (int) (dVar2 / s1.length()) );

d) System.out.println( s2 + " is " + iVar2 * dVar2 );

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!