aspose file tools
The moose likes Beginning Java and the fly likes Interview question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Interview question" Watch "Interview question" New topic
Author

Interview question

surya praveen
Greenhorn

Joined: Aug 11, 2008
Posts: 3
hi ,
Can anyone explain "how can we explain object and class using real time exmples?"
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3268

Originally posted by surya praveen:
hi ,
Can anyone explain "how can we explain object and class using real time exmples?"


See http://en.wikipedia.org/wiki/Class_(computer_science)
See http://en.wikipedia.org/wiki/Object_(computer_science)

As for 'real time examples' you could discuss the concept of an 'Event', e.g. An Event class represents trade events flowing through a financial system in real time, an instance of that Event class is the object.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2547
    
    2

Firstly please UseAMeaningfulSubjectLine for your topic.
This is your second thread with the same subject "Interview question".
Regarding your question, an object can be a student with roll number 123
whereas student itself is a class.
Please take some time to read the ask good question link below.


SCJP, SCWCD.
|Asking Good Questions|
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Hmm. I don't want to sound discouraging, but if you struggle with this question in an interview, you are probably not ready to be interviewing for a Java job.

Rather than go through that pain, have a read through the Java tutorial. This covers the basics. You might also Google for "Thinking In Java" which is a good, free book about the language.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35220
    
    7
As for 'real time examples' you could discuss the concept of an 'Event'

I'm fairly certain that what is meant here are "real world examples", not "real time examples".
[ August 11, 2008: Message edited by: Ulf Dittmer ]

Android appsImageJ pluginsJava web charts
K. Tsang
Ranch Hand

Joined: Sep 13, 2007
Posts: 1219

I agree with Paul. If you ask this. Why not ask can a car for example be an "object"? Can car be a "class"?

Ultimately I personally think, anything can be object and/or class depending on how you look at it. It's like if it "has" attributes then it's a class/object. If it can't have any lower-denominated attribute (so to speak) then it can't be class/object.

Simple definition in real life is object=physical representation and class=logical representation of something.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Interview question
 
Similar Threads
overload question
mock exam question
UML 486 Question
how can i print an xml document through dom api
JspFragment