• 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

Question on Exam

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My friend had the Java Exam at the University yesterday. PhD aksed him if the objects in Java are buffered. Only one question. What would YOU reply?
 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mason and welcome to the JavaRanch ;-)

I think this question is really stupid without knowing the context. Did he talk about a particular kind of objects? And what should "buffered" mean exactly? In my opinion without more information this question is pointless.

Marco
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's a mistake to answer this without knowing the context....but by buffer probably he is meaning Heap....Yes. Objects go on Heap.
 
Marco Ehrentreich
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think, a PhD should be able to ask smarter questions. And if he meant "heap" but asked about "buffer" he can't expect someone other to give a good answer for a wrong question ;-)

Marco
 
amol deshpande
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Marco.....Agreed .


-333
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, particular object instances are buffered.

e.g. values of type Integer from range -128 to 127. Here is the rt.jar code:


Other interesting point in answer to this question is method:

of class String. Please consider javadoc for details.
 
Marco Ehrentreich
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, now we have "buffer", "heap", "string literal pool" and "cache"... What else?

Of course there are concepts like cache or buffer all over the JDK but in my opinion the question is still stupid. In Java there's no generic concept like an "object buffer" and that's the point here!

Surely your answers would've been great if that PhD had asked for examples of a cache or object pool in the JDK.


Marco
 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wonder if the second question would have been:
Explain the use of pointers in Java.



J.
reply
    Bookmark Topic Watch Topic
  • New Topic