Question: 1. for (int i = 4; i < 6; i ++) { for (int j = 6; j < 11; j++) { if (j >=

1. for (int i = 4; i < 6; i ++) { for (int j = 6; j < 11; j++) {

if (j >= c) {

break; }

System.out.print(" " + i + j + " ");

}

}

If we know that the output is " 46 47 48 56 57 58", what is the value of c?

2. If the following code prints 7, which of these is a possible value for X?

String text = "01f3f56f89f"

int num = text.indexOf("f", X);

System.out.println(num);

 

Step by Step Solution

3.34 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Q1 To find the value of c lets break down the code and output 1 The outer loop iterate... View full answer

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 Programming Questions!