• Post Reply Bookmark Topic Watch Topic
  • New Topic

Please explain following terms in very simple words-PLEASE!  RSS feed

 
Aparna Ram
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Class, Object, method overloading & overriding, polymorphism, difference between thread and process.

Please explain the above using the simplest words so a lay man can try to understand.. many thanks in advance.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Class - A representation of something with the use of properties and functions that might do something with these properties. Example class dog can have a collar and have a renewCollar() function.

Object - The class is instantiated inside a program and exists as an object in the memory, the heap.

Overloading - Providing a different implementation for the same method based on the inputs received. Ex renewCollar() and renewCollar(License li)

Overriding - Providing a different implementation for the same method in a subclass. Ex: Labrador class extends Dog class and both have the renewCollar() method with same signature. renewCollar() works differently with Labrador than with a Dog.

Polymorphism - Stuff like inheritance, overriding represent polymorphism.

difference between thread and process - A thread is like a part of a process. A process can spawn many many threads. When you start a program you start a process. That process in turn may use multiple threads to execute code. Each thread is given a time slice of the processor to execute.

You should google first before you ask here.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12542
48
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, read this.
 
Aparna Ram
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I completely understand all that.

Since I was not able to come up with explanations easier to understand in simple words, when I did a Google search, I had to post the question here!!

If this was a mistake, I am sorry to have wasted your time.
All said, I also thank you very much for the reply sent.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!