Friday, 4 July 2014

Why NullPointerExcepton occur in java?

     NullPointerException is Situation in code where you try to access or modify an Object which has not been initialized yet.

  public class NPEException{
  public static void main(String args[]){
      String s="null";
      System.out.println("s.toSting()");
     }
  }


No comments:

Post a Comment