• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Console doubts on ExamLab Q46

 
Ranch Hand
Posts: 38
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ExamLab practice test 2 , question 46:


Quote: The API DOC states :

console() - Returns the unique Console object associated with the current JVM
writer() - Retrieves the unique PrintWriter object associated with this console



What "unique" means? I thought it means that cs1 and cs2 point to the different objects!
So how == evaluates to true?

but the output is 4 true's
 
Sheriff
Posts: 7134
1360
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Valentin Ivanov wrote:What "unique" means? I thought it means that cs1 and cs2 point to the different objects!
So how == evaluates to true?


Unique means one and only one.
 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Quote: The API DOC states :

console() - Returns the unique Console object associated with the current JVM
writer() - Retrieves the unique PrintWriter object associated with this console



Well, unique here means the one and only Console object associated with the JVM and the only PrintWriter object associated with that console.
 
reply
    Bookmark Topic Watch Topic
  • New Topic