Friday, 29 January 2016

Java Tutorial : Java summary of Interfaces

Java Tutorial : Java Super Keyword (Invoke super class default constructor-compiler)


Click here to watch in Youtube :
https://www.youtube.com/watch?v=rRPicPJVSOk&list=UUhwKlOVR041tngjerWxVccw

Click the below Image to Enlarge
Java Tutorial : Java Super Keyword (Invoke super class default constructor-compiler) 
SuperClass.java
public class SuperClass
{

    public SuperClass()
    {
        System.out.println("Inside SuperClass default Constructor");
        
    }

}
SubClass.java
public class SubClass extends SuperClass
{

    public SubClass()
    {
        System.out.println("Inside SubClass default Constructor");
    }

}
SuperTest.java
public class SuperTest
{

    public static void main(String[] args)
    {
        SubClass subClassObj = new SubClass();
    }
}
Output
Inside SuperClass default Constructor
Inside SubClass default Constructor
Click the below link to download the code:
https://sites.google.com/site/javaee4321/java/SuperKeywordDemo_invoke_defaultCons_Compiler_App.zip?attredirects=0&d=1

Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/SuperKeywordDemo_invoke_defaultCons_Compiler_App

Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/d8bcbd739d9d2ceaeec7ee56b1959925c6ec69d4/BasicJava/SuperKeywordDemo_invoke_defaultCons_Compiler_App/?at=master

See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Java Tutorial : Java super keyword (Invoke super class default constructor)


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=38drYmvwbcM&list=UUhwKlOVR041tngjerWxVccw

    Click the below Image to Enlarge
    Java Tutorial : Java super keyword (Invoke super class default constructor)
    SuperClass.java
    public class SuperClass
    {
    
        public SuperClass()
        {
            System.out.println("Inside SuperClass default Constructor");
            
        }
    
    }
    
    SubClass.java
    public class SubClass extends SuperClass
    {
    
        public SubClass()
        {
            super();
            System.out.println("Inside SubClass default Constructor");
        }
    
    }
    
    SuperTest.java
    public class SuperTest
    {
    
        public static void main(String[] args)
        {
            SubClass subClassObj = new SubClass();
        }
    }
    
    Output
    Inside SuperClass default Constructor
    Inside SubClass default Constructor
    
    Click the below link to download the code:
    https://sites.google.com/site/javaee4321/java/SuperKeywordDemo_invoke_defaultCons_App.zip?attredirects=0&d=1

    Github Link:
    https://github.com/ramram43210/Java/tree/master/BasicJava/SuperKeywordDemo_invoke_defaultCons_App

    Bitbucket Link:
    https://bitbucket.org/ramram43210/java/src/d8bcbd739d9d2ceaeec7ee56b1959925c6ec69d4/BasicJava/SuperKeywordDemo_invoke_defaultCons_App/?at=master

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Java Tutorial : Java super keyword - Playlist

    Java Tutorial : Java super keyword (Access super class members)


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=dHqMAZtnJIg&list=UUhwKlOVR041tngjerWxVccw

    Click the below Image to Enlarge
    Java Tutorial : Java super keyword (Access super class members) 
    Superclass.java
    public class Superclass
    {
        String name = "Peter";
        public void printMethod()
        {
            System.out.println("Printed in Superclass.");
        }
    }
    
    SubClass.java
    public class SubClass extends Superclass
    {
    
        String name = "John";
    
        // overrides printMethod in Superclass
        public void printMethod()
        {
            super.printMethod();
            System.out.println("name : " + name);
            System.out.println("super.name : " + super.name);
            System.out.println("Printed in Subclass");
        }
    
    }
    
    SuperTest.java
    public class SuperTest
    {
    
        public static void main(String[] args)
        {
            SubClass subClassObj = new SubClass();
            subClassObj.printMethod();
        }
    }
    
    Output
    Printed in Superclass.
    name : John
    super.name : Peter
    Printed in Subclass
    
    Click the below link to download the code:
    https://sites.google.com/site/javaee4321/java/SuperKeywordDemo_Access_Members_App.zip?attredirects=0&d=1

    Github Link:
    https://github.com/ramram43210/Java/tree/master/BasicJava/SuperKeywordDemo_Access_Members_App

    Bitbucket Link:
    https://bitbucket.org/ramram43210/java/src/d8bcbd739d9d2ceaeec7ee56b1959925c6ec69d4/BasicJava/SuperKeywordDemo_Access_Members_App/?at=master

    See also:

  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Java Tutorial : Java summary of creating and using classess and objects


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=LieFUS6tUKg&list=UUhwKlOVR041tngjerWxVccw

    Click the below Image to Enlarge
    Java Tutorial : Java summary of creating and using classess and objects
    Java Tutorial : Java summary of creating and using classess and objects
    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Java Tutorial : Generate override methods using eclipse


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=pFCvveNylmQ&list=UUhwKlOVR041tngjerWxVccw

    Click the below Image to Enlarge
    Java Tutorial : Generate override methods using eclipse
    Java Tutorial : Generate override methods using eclipse
    Java Tutorial : Generate override methods using eclipse
    Java Tutorial : Generate override methods using eclipse
    Java Tutorial : Generate override methods using eclipse
    person.java
    public class person
    {
        public void walk()
        {
            System.out.println("Walking Slow");
        }
        
        public void eat()
        {
            System.out.println("Eating Slow");
        }
        
    }
    
    Employee.java
    public class Employee extends person
    {
    
        @Override
        public void walk()
        {
            // TODO Auto-generated method stub
            super.walk();
        }
    
        @Override
        public void eat()
        {
            // TODO Auto-generated method stub
            super.eat();
        }
    
        @Override
        public String toString()
        {
            // TODO Auto-generated method stub
            return super.toString();
        }
            
        
    
    }
    
    Click the below link to download the code:
    https://sites.google.com/site/javaee4321/java/GenerationDemo_Eclipse_override_App.zip?attredirects=0&d=1

    Github Link:
    https://github.com/ramram43210/Java/tree/master/BasicJava/GenerationDemo_Eclipse_override_App/GenerationDemo

    Bitbucket Link:
    https://bitbucket.org/ramram43210/java/src/d8bcbd739d9d2ceaeec7ee56b1959925c6ec69d4/BasicJava/GenerationDemo_Eclipse_override_App/GenerationDemo/?at=master

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Java Tutorial : Generate hashCode and equals method using eclipse


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=mohRInH9h-U&list=UUhwKlOVR041tngjerWxVccw

    Click the below Image to Enlarge
    Java Tutorial : Generate hashCode and equals method using eclipse
    Java Tutorial : Generate hashCode and equals method using eclipse
    Java Tutorial : Generate hashCode and equals method using eclipse
    Java Tutorial : Generate hashCode and equals method using eclipse
    Employee.java
    public class Employee
    {
        private String name;
        private int age;
        private int salary;
    
        @Override
        public int hashCode()
        {
            final int prime = 31;
            int result = 1;
            result = prime * result + age;
            result = prime * result
                    + ((name == null) ? 0 : name.hashCode());
            result = prime * result + salary;
            return result;
        }
    
        @Override
        public boolean equals(Object obj)
        {
            if (this == obj)
                return true;
            if (obj == null)
                return false;
            if (getClass() != obj.getClass())
                return false;
            Employee other = (Employee) obj;
            if (age != other.age)
                return false;
            if (name == null)
            {
                if (other.name != null)
                    return false;
            }
            else if (!name.equals(other.name))
                return false;
            if (salary != other.salary)
                return false;
            return true;
        }
    
    }
    
    Click the below link to download the code:
    https://sites.google.com/site/javaee4321/java/GenerationDemo_Eclipse_hashcode_equals_App.zip?attredirects=0&d=1

    Github Link:
    https://github.com/ramram43210/Java/tree/master/BasicJava/GenerationDemo_Eclipse_hashcode_equals_App/GenerationDemo

    Bitbucket Link:
    https://bitbucket.org/ramram43210/java/src/d8bcbd739d9d2ceaeec7ee56b1959925c6ec69d4/BasicJava/GenerationDemo_Eclipse_hashcode_equals_App/GenerationDemo/?at=master

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Thursday, 28 January 2016

    Java Tutorial : Generate toString using eclipse


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=L50pb2VU4JI&list=UUhwKlOVR041tngjerWxVccw

    Click the below Image to Enlarge
    Java Tutorial : Generate toString using eclipse 
    Java Tutorial : Generate toString using eclipse 
    Java Tutorial : Generate toString using eclipse 
    Java Tutorial : Generate toString using eclipse 
    Employee.java
    public class Employee
    {
        private String name;
        private int age;
        private int salary;
    
        @Override
        public String toString()
        {
            return "Employee [name=" + name + ", age=" + age
                    + ", salary=" + salary + "]";
        }
    
    }
    
    Click the below link to download the code:
    https://sites.google.com/site/javaee4321/java/GenerationDemo_Eclipse_toString_App.zip?attredirects=0&d=1

    Github Link:
    https://github.com/ramram43210/Java/tree/master/BasicJava/GenerationDemo_Eclipse_toString_App/GenerationDemo

    Bitbucket Link:
    https://bitbucket.org/ramram43210/java/src/2ec4ef86a93fffce49e990abd3b81708f562c200/BasicJava/GenerationDemo_Eclipse_toString_App/GenerationDemo/?at=master

    See also:

  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Wednesday, 27 January 2016

    Java Tutorial : Generate Constructors using eclipse


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=NE44_5jrU8o&list=UUhwKlOVR041tngjerWxVccw

    Click the below Image to Enlarge
    Java Tutorial : Generate Constructors using eclipse 
    Java Tutorial : Generate Constructors using eclipse 
    Java Tutorial : Generate Constructors using eclipse 
    Java Tutorial : Generate Constructors using eclipse 
    Java Tutorial : Generate Constructors using eclipse 
    Java Tutorial : Generate Constructors using eclipse 
    Java Tutorial : Generate Constructors using eclipse 
    Java Tutorial : Generate Constructors using eclipse 
    Java Tutorial : Generate Constructors using eclipse 
    Java Tutorial : Generate Constructors using eclipse 
    Java Tutorial : Generate Constructors using eclipse 
    Java Tutorial : Generate Constructors using eclipse 

    Person.java
    public class Person
    {
        private String name;
        private int age;
    
        public Person(String name, int age)
        {
            super();
            this.name = name;
            this.age = age;
        }
    
    }
    
    Employee.java
    public class Employee extends Person
    {
        private int salary;
    
        public Employee(String name, int age)
        {
            super(name, age);
            // TODO Auto-generated constructor stub
        }
    
        public Employee(String name, int age, int salary)
        {
            super(name, age);
            this.salary = salary;
        }
    
    }
    
    Click the below link to download the code:
    https://sites.google.com/site/javaee4321/java/GenerationDemo_Eclipse_Cons_App.zip?attredirects=0&d=1

    Github Link:
    https://github.com/ramram43210/Java/tree/master/BasicJava/GenerationDemo_Eclipse_Cons_App/GenerationDemo

    Bitbucket Link:
    https://bitbucket.org/ramram43210/java/src/527ec09d8e1fd3cdfc42e1a5df2ff8d97e615036/BasicJava/GenerationDemo_Eclipse_Cons_App/GenerationDemo/?at=master

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Java Tutorial : Generate Getter and Setter methods using eclipse


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=IgaROa01QE8&list=UUhwKlOVR041tngjerWxVccw

    Click the below Image to Enlarge
    Java Tutorial : Generate Getter and Setter methods using eclipse
    Java Tutorial : Generate Getter and Setter methods using eclipse
    Java Tutorial : Generate Getter and Setter methods using eclipse
    Java Tutorial : Generate Getter and Setter methods using eclipse
    Employee.java
    public class Employee
    {
    
        private String name;
        private int age;
        private int salary;
    
        public String getName()
        {
            return name;
        }
    
        public void setName(String name)
        {
            this.name = name;
        }
    
        public int getAge()
        {
            return age;
        }
    
        public void setAge(int age)
        {
            this.age = age;
        }
    
        public int getSalary()
        {
            return salary;
        }
    
        public void setSalary(int salary)
        {
            this.salary = salary;
        }
    
    }
    
    Click the below link to download the code:
    https://sites.google.com/site/javaee4321/java/GenerationDemo_Eclipse_Getter_Setter_App.zip?attredirects=0&d=1

    Github Link:
    https://github.com/ramram43210/Java/tree/master/BasicJava/GenerationDemo_Eclipse_Getter_Setter_App/GenerationDemo

    Bitbucket Link:
    https://bitbucket.org/ramram43210/java/src/527ec09d8e1fd3cdfc42e1a5df2ff8d97e615036/BasicJava/GenerationDemo_Eclipse_Getter_Setter_App/GenerationDemo/?at=master

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Java Tutorial : Java Operator Overloading


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=V3GO5UxnJLc&list=UUhwKlOVR041tngjerWxVccw

    Click the below Image to Enlarge
    Java Tutorial : Java Operator Overloading 
    OperatorOverloadingTest.java
    public class OperatorOverloadingTest
    {
        public static void main(String[] args)
        {
            String message = "Welcome" + " John";
            System.out.println("message : " + message);
    
            int result = 20 + 30;
            System.out.println("Result  : " + result);
        }
    
    }
    
    Output
    message : Welcome John
    Result  : 50
    
    Click the below link to download the code:
    https://sites.google.com/site/javaee4321/java/OperatorOverloading_App.zip?attredirects=0&d=1

    Github Link:
    https://github.com/ramram43210/Java/tree/master/BasicJava/OperatorOverloading_App

    Bitbucket Link:
    https://bitbucket.org/ramram43210/java/src/527ec09d8e1fd3cdfc42e1a5df2ff8d97e615036/BasicJava/OperatorOverloading_App/?at=master

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Java Tutorial : Java Runtime Polymorphism(version2)


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=jAfw5OAZkmg&list=UUhwKlOVR041tngjerWxVccw

    Click the below Image to Enlarge
    Java Tutorial : Java Runtime Polymorphism(version2)
    Animal.java
    class Animal
    {
        void whoAmI()
        {
            System.out.println("I am a generic Animal.");
        }
    }
    
    class Dog extends Animal
    {
        void whoAmI()
        {
            System.out.println("I am a Dog.");
        }
    }
    
    class Lion extends Animal
    {
        void whoAmI()
        {
            System.out.println("I am a Lion.");
        }
    }
    
    class Tiger extends Animal
    {
        void whoAmI()
        {
            System.out.println("I am a Tiger.");
        }
    }
    
    RunTimePolymorphismDemo.java
    public class RunTimePolymorphismDemo
    {
    
        public static void main(String[] args)
        {
            Animal animalRef = new Animal();
            animalRef.whoAmI();
    
            animalRef = new Dog();
            animalRef.whoAmI();
            
            animalRef = new Lion();
            animalRef.whoAmI();
            
            animalRef = new Tiger();
            animalRef.whoAmI();     
        }
    
    }
    
    Output
    I am a generic Animal.
    I am a Dog.
    I am a Lion.
    I am a Tiger.
    
    Click the below link to download the code:
    https://sites.google.com/site/javaee4321/java/PolymorphismDemo_Runtime_V2_App.zip?attredirects=0&d=1

    Github Link:
    https://github.com/ramram43210/Java/tree/master/BasicJava/PolymorphismDemo_Runtime_V2_App

    Bitbucket Link:
    https://bitbucket.org/ramram43210/java/src/527ec09d8e1fd3cdfc42e1a5df2ff8d97e615036/BasicJava/PolymorphismDemo_Runtime_V2_App/?at=master

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial