ExamVeda
Login
Home
This question belongs to Java Program Flow Control
Flow Control
?

What will be the output of the following program?
public class Test{
        public static void main(String args[]){
                int i = 0, j = 5 ;
                for( ; (i < 3) && (j++ < 10) ; i++ ){
                        System.out.print(" " + i + " " + j );
                }
                System.out.print(" " + i + " " + j );
        }
}

Answer & Solution
Correct Answer: Option A
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Bhaskar Uday
Bhaskar Uday 8 years ago
If we use && kf first block becomes false it will not work on 2nd block.As 4