Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • javap tool in Java

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 671
    Comment on it

     javap tool 

    javap is a command which when used with a classname, disassembles that class file. This command displays fields,methods and constructors information which are present in the class file with which javap command is used.

    Syntax of javap command:

    javap full_class_name  

    Example to demonstrate javap command:

    class Demo
    {  
      public static void main(String args[])
      {  
       System.out.println("hello Demo");  
      }  
    }  

    When javap command is used with Demo class it disassemble the Demo class file.

    javap Demo  

    Output:

    Compiled from ".java"  
    class Demo
    {  
      Demo();        //constructor  
      public static void main(java.lang.String[]);  //method  
    }  

    In above output it can be seen that constructor and method with Demo class are displayed when javap command is used with Demo class file. Since there was no constructor in Demo class therefore a default constructor is automatically called with name Demo.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: