Boxing and unboxing in java

The concept of representing the primitive data values in the form of its equivalent and corresponding wrapper class objects is known as "boxing"            Integer x= new Integer(3);           Double... read more ?

Wrapper Classes

(adsbygoogle = window.adsbygoogle || []).push({}); Using wrapper classes we can wrap the concept of object on the top of the primitive data. And represent the primitive data values... read more ?

Print numbers in pyramid shape

package com.instanceofjava;   public class Pyramidshape {    public static void main(String[] args) {     int num=10;     for (int i = 1; i < num;... read more ?

Sort object using comparator

(adsbygoogle = window.adsbygoogle || []).push({}); package com.instanceofjava;   public class Employee  {    int id;  String name;    public Employee(int id, String name) {     this.id=id;  ... read more ?

Sort object using comparable interface

(adsbygoogle = window.adsbygoogle || []).push({}); package com.instanceofjava;   import java.util.Comparable;   public class Employee implements Comparable<Employee> {    int id;  String name;    public Employee(int id, String name)... read more ?

Method overriding example program

(adsbygoogle = window.adsbygoogle || []).push({}); package com.oops;    class A {    void msg(){    System.out.println("Hello");   }    } class B extends A {    void msg(){... read more ?

Select Menu