• 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

Type Definitions in java

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Recently I faced this question " How many type definitions are there in java?"

I have an answer like interface,class,primitive datatypes.
Am I correct?
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's no way to know whether you're correct without knowing what the interviewer meant by the question. Personally, I'd assume they wanted a list of primitive types, and then a few words about reference types -- but really, who knows?
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, no... They were clearly asking how many class definitions exist.

As Ernest said, this depends entirely on what the interviewer meant by that. I'm convinced that some interviewers ask deliberately vague questions to test whether you understand the question doesn't really make sense, and to see how you "push back" for clarification.
 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think i got the right answer:

one -> Object.class
 
vijayk kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me clear the topic
The question is exactly the same.
I said all the primitive data types .
( But class is also an abstract data type or a user defined datatype
I think interface is also a type )
Then the interviewer posed this question.
So let me know now the concept behind this question.

Thanks

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your interviewer's question is so vague they might as well have asked, "how long is a piece of string"?
 
reply
    Bookmark Topic Watch Topic
  • New Topic