Category: Java

  • What is Upcasting and Downcasting in Java

    What is Upcasting and Downcasting in Java

    What is Upcasting and Downcasting in Java   What is Up Casting and Down Casting in Java,in this article i will step through a sample program and explain when you need to use Up casting and when you need to use Down casting . In this Sample Program i have created 3 Class robot  class…

  • Numerical Casting in Java

    Numerical Casting in Java

    Numerical Casting in Java   Numerical Casting in Java, In this Article i will talk about what is Numerical Casting use in Java There are alot of Numerical Types in Java ( byte, short, long , integer, double , float etc . Some time you might need to convert the types of numerical variable individually…

  • Encapsulation in Java

    Encapsulation in Java

    Encapsulation in Java Encapsulation in Java. Wrapping Private Data and bind the whole data and code as a single unit Hide Data, only can be access by the method of its current class. How to Do Encapsulaion Declare the Variable as Private Create getter and Setter for the private Variable   Parent class the cars…

  • Polymorphism in Java

    Polymorphism in Java

    Polymorphism in Java   What is P0lymorphism in Java > Simple Explanation– A Single Method  in a  parent class , can be use  different way by its child Class through referencing.   Class Animalss First i have created a parent class i called it “animalss” All animals make noise right The next step i have created…

  • Java Map

    Java Map

    Java Map Java Map , consist of a combination of key and value . Every individual  pair of Key and Value is called Entry. In this Article , I will step through a simple Sample program to explain what is Java Map and how to implement entry and key. Class mapIt First i have created…