• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
What is Class in Java and Object Oriented Programming
 

What is Class in Java and Object Oriented Programming

on

  • 606 views

Class and Object are two pillars of OOPS languages, see here http://javarevisited.blogspot.sg/2011/10/class-in-java-programming-general.html

Class and Object are two pillars of OOPS languages, see here http://javarevisited.blogspot.sg/2011/10/class-in-java-programming-general.html

or <a>Java67 Blog</a>

Statistics

Views

Total Views
606
Views on SlideShare
606
Embed Views
0

Actions

Likes
0
Downloads
9
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    What is Class in Java and Object Oriented Programming What is Class in Java and Object Oriented Programming Presentation Transcript

    • What is Class in Java Programminghttp://javarevisited.blogspot.com
    • What is Class in Java• Are you familiar with date types like int, long, float?• If Yes, than what is the limitation of these data types?• You got it right, they can only hold one type of data, i.e an int can only store integer values, a float can only store floating point values.
    • What is Class in Java• Then question comes, how do we represent user defined types e.g. Person which can have a String name, a long phone number and an int age• Class in Java is way to go.• Class in Java is used to create user defined types.
    • What is Class in Java• Benefit of user defined type is that it can combine and store multiple type and gives you power to create a user defined type for anything which exists in real world.• You can divide them into two category.• JDK or System classes and Application Classes
    • What is Class in Java• JDK Classes are those which comes along with JDK e.g. java.lang.String, java.lang.Thread• Application classes are those which you create in your Java program or application e.g. Person, Student etc• Class in Java is created using class keyword
    • What is Class in JavaHere is an example of user defined classclass Person{ int age; String name; long phone; public void int getAge(){ return age; }}
    • What is Class in Java• Except holding code for variables e.g. age, name and phone and methods e.g. getName(), class doesn’t do any thing.• Real magic starts when you create object of class.• For example every single person e.g. you, me and your friend are object of Person, they have different name, age and phone number but they are Person
    • What is Class in Java• Object are actual thing which is created from blueprint called class.• Just like every car including BMW, Merc and Audy has blueprint and follow specification, every object follows structure defined in class.• We learn more about object in Java in our next presentation.
    • What is Class in Java• In Summary you can say a Class in Java is – A user defined type – A way to combine multiple data types into one – A blueprint to create object – A structure to hold variables and methods together
    • Related Articles and Post• For more details on Class and Object in Java, See :• What is Class in Java programming language• What is Object in Java programming language• Website: http://javarevisited.blogspot.com /
    • LIKED IT?Tweet this presentation Share this on Facebook