Java Classes And Objects In Hindi – Java OOP’s

Java

Java Classes And Objects In Hindi Java OOP’s in Hindi -Is Post Mai Learn Karne Wale Hai Ki Java Classes In Hindi And Java Objects In Hindi Kiya Hote Hai|

Also Read – Java OOP’s Concepts

Java Classes And Objects In Hindi

Java OOPs in Hindi Ek software development paradigm Hai | Joki procedure oriented approach Mai Aane Wale problems Ko solve Karne ke Liye Kiya Jata Hai | 

Java Object-oriented programming, Data ko program development Ke Douran system Mai flow Nhi Hone Deta । Yah Aise Kisi Bhi other function Kai Duvara Achanak change Hone Se Rokta Hai | Isme problem Ko object Ke Duvara solve Kiya Jata Hai | Or Isme data or function object Kai Sath Kaam Karte Hai | object ke data Ko Keval object ka function Hi access kar sakta Hai ।

Python Oops In Hindi

Jyada tar Programming Languages Mai OOP ka Concept Hota Hai | Java Ke Object Mai Variables, Functions Ya Method Hote Hai |

Python Oops In Hindi -  Python Classes and Objects In Hindi

For Example Agar Koi Car Hai To Us Car Ke Parts Or Color, Model Etc Ko Variables Or Functions Ya Methods Ke Jariye Likha Jata Hai |

What Is Class In Hindi

Class Ek user-defined data type hai | ye C language mei structure ki Tarah hi Hota hai | Lekin classes mei Aap variable ke sath sath unse related functions Bhi Bana Sakte hai | Jinhe Aap bad mei objects ke duvara access kiya ja sakta hai.

Java Classes In Hindi

Java Mai Class Ko Create Karne Ke Liye class Keyword Ka Istemal Kiya Jata Hai |

Class Definition Syntax:

public class Main {
  // code goes here...
}

Main Class Ka Name Hai, Yaha Par Aap Kuch Bhi De Sakte Hai |

Class Definition Example:

public class Main {
  int x = 15;
}

Java Objects In Hindi

Class ek user-defined data type hai | Class type ke variables ko objects kaha jata hai |

object creation syntax:

class_name myObj = new class_name();

object creation example:

public class Main {
  int x = 15;

  public static void main(String[] args) {
    Main myObj = new Main();     // Create  Object 
    System.out.println(myObj.x);   // Call to Object
  }
}

Aapko Pta Hoga Ki Hamne Class Main Create Kiya Tha Upper Or Ab Hamne Us Class Ka Ek Main myObj Create Kiya Hai | aap Kitne bhi object create Kar Sakte Hai |

Output:

15

Example 2:

Is Example Me Hamne 2 Objects Ko Create Kiya Hai |

public class Main {
  int x = 5;

  public static void main(String[] args) {
    Main myObj1 = new Main();  // Object 1
    Main myObj2 = new Main();  // Object 2
    System.out.println(myObj1.x);
    System.out.println(myObj2.x);
  }
}

Output:

5
5

Yadi Aapne  HTML Full Course  And CSS Full Course And Python Full Course And PHP Full Course Nhi Read Kiya Hai To Aap Vah Bhi Read Kar Sakte Hai |

Friends Mujhe Umeed Hai Ki Aapko Class And Objects in Java in Hindi Ke Bare Mai 100% Jankari Ho Gayi Hogi | Agar Aapko Learn Karne Main Dikkat Aa Rahi Hai To Aap Mere Se Contact Kar Sakte Hai |

Leave a Reply

Your email address will not be published. Required fields are marked *