OCJP Cerification Sample Question Set-1

0
11
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

In this post I am going to provide the sample question set for preparing OCJP Examination.

    1. Question-1
public class operatortest {
static public void main(String[] Args)
{
int i ,j;
for(i=0;i<3;i  )
 {
 for(j=1;j<4;j  )
 {
 i%=j;
 System.out.print(j);
    }
 }
}
}

Options:

  1. 1 2 3 1
  2. 1 2 3 2
  3. Continue print 1 2 3 1 2 3  and create a infinite loop
  4. Program compile fails at line -2

To be continued…

Solutions

  1. 3

 

Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

LEAVE A REPLY

Please enter your comment!
Please enter your name here