सीधे मुख्य सामग्री पर जाएं

संदेश

Computer Storage Units Converter

Computer Storage Units Converter Computer Storage Units Converter From: Bytes Kilobytes Megabytes Gigabytes Terabytes Value: To: Bytes Kilobytes Megabytes Gigabytes Terabytes Convert

#60 How to find unique reference number for any class in java |Class के लिए unique reference number

package com.sudhirtheindian2.java123 ; public class D1 { void display (){ System. out .println( this ) ; } public static void main (String[] args) { D1 d = new D1() ; System. out .println(d) ; d.display() ; } }

#59 How to use this keyword in Java | Java में this keyword का use कैसे करे

package com.sudhirtheindian2.java123 ; public class this_keyword { public static void main (String[] args) { // How to call the parameterized constructor of its own class // using this keyword //How to use this keyword in java // whenever the name of instance and local variable are the same // then our run time environment JVM gets confused that which one is // local variable of which one is instance variable // to avoid the problem we should use this keyword // How to find unique reference number for any class in java // 1 this keyword refers the current object inside // a method or constructor // // 4 It is also called parameterized constructor of its own class } }

#58 What is method overloading in Java | Compile Time Polymorphism | Method overloading क्या है?

package com.sudhirtheindian2.java123 ; //class A{ // int sum(){ // int a =10, b=20,c; // c=a+b; // return c; // } // // void sum(int x, int y){ // // double c = x+y; // System.out.println(c); // // } // void sum(int x, double y){ // double c=x+y; // System.out.println(c); // } //} //public class compileT { // public static void main(String[] args) { // // A an =new A(); // an.sum(100,10); // an.sum(100,20.63); // int sum= an.sum(); // System.out.println(sum); // What is method overloading & compile time polymorphism in java // whenever a class contain more than one method // with same name and different types of parameter // called method overloading // syntax // return type method_name(para1); // return type method_name(para1, para2); // } //} package com.sudhirtheindian2.java123 ; class A{ int sum (){ int a = 20 ...

#57 What is Method Overriding in Java | What is Run Time Polymorphism in Java | Overriding क्या है

//package com.sudhirtheindian2.java123; //public class runPoly { // public static void main(String[] args) { // // } // // // // // // // What is method overriding & Runtime polymorphism in java // //// method overriding // //// whenever we writing method in super and sub class //// in such a way that method name and parameter must be same //// called overriding // //// syntax //// class A{ //// void display(){ //// //// } ////} //// //// class B extends A{ //// void display(){ //// //// } //// } // // package com.sudhirtheindian2.java123 ; public class runPoly { public static void main (String[] args) { } // What is method overriding & Runtime polymorphism in java // method overriding // whenever we writing method in super and sub class // in such a way that method name and parameter must be same // called overriding // syntax // class A{ // void ...

#56 What is Polymorphism in Java | Java में polymorphism क्या होता है ?

package com.sudhirtheindian2.java123 ; import javax.swing.* ; public class poly { public static void main (String[] args) { // What is polymorphism in java ? // poly --->>> many // morphism--->>>form // poly+morphism = many form // polymorphism is the greek word // whose meaning is same object having different behaviour // person --->>> // customer // friend // students // teacher // void person(teacher) // void person(students) // void person(friend) // void person(customer) // there are two type to achieve the polymorphism // 1 compile time polymorphism // (static polymorphism, early binding) // A polymorphism which is exists at the time of compilation // is called compile time or early time or static polymorphism // method overloading // we can achieve compile time polymorphism through ...

#55 What is Multiple Inheritance in Java | Java में Multiple Inheritance का use कैसे करे

package com.sudhirtheindian2.java123 ; //class A{ // void show(){ // System.out.println("this is class A"); // } // //} //class B{ // void show(){ // System.out.println("this is class B"); // } //} interface A{ void show () ; // public+abstract } interface B{ void display () ; // public+abstract } public class Multiple implements A , B { public void show (){ System. out .println( "this is interface of a and b" ) ; } public void display (){ System. out .println( "this is display" ) ; } public static void main (String[] args) { Multiple m1 = new Multiple() ; m1.show() ; m1.display() ; } // Multiple inheritance in java ? // Multiple inheritance using interface // we can achieve multiple inheritance through interface // because interface contains only abstract method // which implementation is provided by the su...

#54 What is Hierarchical Inheritance in Java | Hierarchical Inheritance क्या होता है ?

package com.sudhirtheindian2.java123 ; class A{ void input (){ System. out .println( "enter your name" ) ; } } class B extends A{ void display (){ System. out .println( "my name is sudhir" ) ; } } class C extends A{ void show (){ System. out .println( "my name is abhi" ) ; } } public class hirarchy { public static void main (String[] args) { B b = new B() ; C c = new C() ; b.input() ; b.display() ; c.input() ; c.show() ; // What is hierarchical inheritance in java ? // A inheritance which contain // only one super class & multiple sub class // and all sub class directly extends super class // called hierarchial inheritance // super---> sub 1 // super---> sub 2 // super---> sub 3 // super---> sub 4 // } }