Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

q1. What is printed out? int i = 0; while ( i

q1.

What is printed out?

int i = 0; while ( i <= 2 ) { System.out.print( ++i + " "); }

Group of answer choices

1 2

0 1 2

0 1 2 3

1 2 3

q2.

What will print out when the following code is run?

 int a = 0; int temp = 4; for(int i = 0; i < 5; i++) { a = temp - i; } System.out.print(a);

Group of answer choices

0

1

5

10

q3.

Which values will be output?

int i = 1; do { System.out.print(i + " "); i++; } while (i < 4);

Group of answer choices

3

4

2

1

0

5

q4.

What is the difference between the contents of array1 and array2 after initialization:

Integer[] array1 = new Integer[5]; int[] array2 = new int[5];

Group of answer choices

no difference, they are both arrays full of null values.

no difference, they are both arrays full of zeros.

array1 has zeros while array2 has null values.

array1 has null values while array2 has zeros.

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

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions

Question

q1. What is printed out? int i = 0; while ( i

Answered: 1 week ago

Question

7. Understand the challenges of multilingualism.

Answered: 1 week ago