Observe the below code:

public class Q5Tester {
public static void main(String[] args) {
int a=3;
int b=9;

//Line 1
{
System.out.print(""+a+""+b);
System.out.print(""+a+""+b);
}
}
}

Which of the following for loop is the correct one to be added at Line 1 to get the output as 310310? [Select exactly 3 correct options]

for(a=4-1, b=10-1;(a<4)&&(b++ <10);a+=1)

for(a=3, b=9;(a<4)&&(b++ <10);a++)

for(;(a<5)&&(b+=2 <10);a++)

for(;(a<4)&&(b++ <10);a++)

Correct Option - abd

To get all Infosys Certified Java SE8 Developer Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in