• Post Reply Bookmark Topic Watch Topic
  • New Topic

Type Definitions in java  RSS feed

 
vijayk kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • 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?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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?
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • 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.
 
manuel aldana
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • 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
  • 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

 
Dana Bothner-By
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • 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"?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!