qid: enthuware.ocajp.i.v8.2.1010

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
Amit_Tiwari
Posts: 2
Joined: Fri Aug 15, 2014 12:58 pm
Contact:

qid: enthuware.ocajp.i.v8.2.1010

Post by Amit_Tiwari »

The explanation of the answer says below

String String = ""; //This is valid. // This ok for me - Amit
String : for(int i = 0; i< 10; i++) //This is valid too! // This is giving compile time error
{
for (int j = 0; j< 10; j++){
if ( i+ j > 10 ) break String;
}
System.out.println( "hello");
}

I am getting issue with 'String' label, It is giving me compile time error

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: qid: enthuware.ocajp.i.v8.2.1010

Post by admin »

You must be making a mistake. Copy paste the code and compile it from command line. It will compile fine.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests