About Question enthuware.ocpjp.v8.2.1286 :

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

Moderator: admin

Post Reply
TomorrowWorld
Posts: 2
Joined: Wed Dec 23, 2015 11:27 pm
Contact:

About Question enthuware.ocpjp.v8.2.1286 :

Post by TomorrowWorld »

This question nor answer doesn't make any sense to me at all. Can anyone describes what that question is asking and the explanation given to that answer?

All I know is that, some operating systems may not support

Code: Select all

Console 
class to be instantiated. In that case,

Code: Select all

System.console()
will return

Code: Select all

null
.

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

Re: About Question enthuware.ocpjp.v8.2.1286 :

Post by admin »

That is correct. You use System.console() to acquire Console object but it will return null if the JVM instance doesn't support Console. That is all that it is asking.
If you like our products and services, please help us by posting your review here.

lennychapfuwa
Posts: 2
Joined: Tue Dec 18, 2018 6:37 am
Contact:

Re: About Question enthuware.ocpjp.v8.2.1286 :

Post by lennychapfuwa »

"If no console device is available then an invocation of that method will return null." What is a console device. Can you really explain what is a console. Is it a class, or some software that facilitates some operation.

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

Re: About Question enthuware.ocpjp.v8.2.1286 :

Post by admin »

Are you following any book? If not, please go through this to learn all about Console: https://docs.oracle.com/javase/7/docs/a ... nsole.html

Usually, Console is nothing but the command window from where you run your java class.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests