About Question enthuware.ocpjp.v7.2.1322 :

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

Moderator: admin

Post Reply
Danny Sheridan
Posts: 30
Joined: Sat May 02, 2015 4:48 pm
Contact:

About Question enthuware.ocpjp.v7.2.1322 :

Post by Danny Sheridan »

No change is required in the JVM for supporting assertions.
The new usage of command line switches (-ea -da -esa -dsa) must have required changes to vm launch.
Were there not also actual JVM changes then too?

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

Re: About Question enthuware.ocpjp.v7.2.1322 :

Post by admin »

As per http://docs.oracle.com/javase/7/docs/te ... ssert.html
assertions require only a runtimr library change , not a jvm change. That is also whhy old code that uses assert as user defined token will work with new jvm.
If you like our products and services, please help us by posting your review here.

Chen@ukr.net
Posts: 9
Joined: Sat Feb 27, 2016 1:17 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1322 :

Post by Chen@ukr.net »

Besides the 'assert' keyword, new methods are added in java.lang.Class and java.lang.ClassLoader classes.
i didn`t get that statement, explain it more.

(as i understand Assertions require changes at the API level.- mean that you must modify you method api, thats wrong)
can you explain:
Besides the 'assert' keyword, new methods are added in java.lang.Class and java.lang.ClassLoader classes.

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

Re: About Question enthuware.ocpjp.v7.2.1322 :

Post by admin »

I am not sure I understand your question. They added more methods to the two classes. You can compare the classes accross java 2 and java 3/4.
If you like our products and services, please help us by posting your review here.

dieterdde
Posts: 19
Joined: Wed May 25, 2016 4:33 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1322 :

Post by dieterdde »

Hi, question,

Option #4: Code that uses Assertions cannot be run on version below 1.4

In the book I'm studying, it said that if you use the assert identifier, on 1.3 it will compile but with warnings.

How should one interpret "uses Assertions" for the exam? Does it only refer to the assert as a keyword?

I thought this question was in general about assertions, whether in the old style with an identifier or with the newer style with the keyword. Does the capital "A" in Assertions refers then only to the keyword style?

Cheers,
Dieter

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

Re: About Question enthuware.ocpjp.v7.2.1322 :

Post by admin »

The phrase "Using assertions" implies using the assertions feature of Java language and not using assert as an identifier.
"Using assert as an identifier" means using assert as an identifier and not as a keyword.
If you like our products and services, please help us by posting your review here.

dieterdde
Posts: 19
Joined: Wed May 25, 2016 4:33 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1322 :

Post by dieterdde »

admin wrote:The phrase "Using assertions" implies using the assertions feature of Java language and not using assert as an identifier.
"Using assert as an identifier" means using assert as an identifier and not as a keyword.
Ok good, that'll come in handy for the exam!

Btw, when do you ever sleep, Paul, you posted this after 3AM!?!

Cheers,
Dieter

Post Reply

Who is online

Users browsing this forum: No registered users and 243 guests