The Artima Developer Community
Sponsored Link

Java Buzz Forum
What is the difference between a Class and an Object in Java?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Javin Paul

Posts: 1090
Nickname: javinpaul
Registered: Jan, 2012

Javin Paul is Java Programmer working on Finance domain.
What is the difference between a Class and an Object in Java? Posted: Aug 7, 2014 7:20 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Javin Paul.
Original Post: What is the difference between a Class and an Object in Java?
Feed Title: Java67
Feed URL: http://www.java67.com/feeds/posts/default?alt=rss
Feed Description: Java and technology tutorials, tips, questions for all programmers.
Latest Java Buzz Posts
Latest Java Buzz Posts by Javin Paul
Latest Posts From Java67

Advertisement
This article is solely for all beginner programmers, who are learning object oriented programming language e.g. Java, C++ or C# and aspire to do well on any programming interview. Difference between class and object is one of the most common question, you would like to ask a fresher coming out from college or training institute, but you would be surprised how many beginner Java programmers struggle with this question. Class and Object are two pillars of Object Oriented Programming (OOPS) and a good understanding is must, but when you ask this question apart from theoretical and bookish answer that "class is a blueprint and objects are actual things created out of those blueprint", you would hardly get anything substantial. Though that answer is correct and works perfectly, it doesn't differentiate between a programmer, who has just mugged the answer, or the one who truly understand the difference between class and object. So, if I receive that answer, I usually ask them to create a class and explain how objects are created in program, let's say to represent an Employee, Student or simply a Car. If programmer truly understand what is a class and what is an object, it will do that in no time, but if he has just mugged up the answer, then he will be totally confused. Point is to understand the difference between class and object, not to mug up for an interview, Why? because if you know your class and object, it would be lot easy for you to work with an object oriented programming language like Java or C#. To give you some more example of class and object, if Car is a class than Merc, Audi and BMW are objects. If Television is class than Sony Bravia, Samsung Smart tv are its object. If Smartphone is a class then  iPhone, Samsung Galaxy and Nokia Lumia are their object. In an object oriented application, generally nouns are represented using class, for example in finance domain Order, Trade, Instruments are classes. In E-commerce domain Payment, Order, Products are some example of classes.
Read more »

Read: What is the difference between a Class and an Object in Java?

Topic: Top 10 Very Very VERY Important Topics to Discuss Previous Topic   Next Topic Topic: Code is NOT poetry, it is just code

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use