[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ClassCastException when loading Applet into Browser

Posted on 2009-04-22
19
Medium Priority
?
1,094 Views
Last Modified: 2012-05-06
I have an an application which runs an Applet as seen in Code Snippet 1. A JAR file has been created and signed and is loaded into the browser with Code Snippet 2.

When running the error is:

java.lang.ClassCastException: graph.AppletViewerTest cannot be cast to java.applet.Applet
      at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassCastException: graph.AppletViewerTest cannot be cast to java.applet.Applet

Now I believe I have done everything necessary in turning an applet into a runnable application, so it can be made into a JAR and signed and run on a browser. Is something missing for me to be getting this exception?
Code snippet 1:
public class AppletViewerTest {
	
	public static void main(String[] args) {
	    //... Create an initialize the applet.
	    Applet theApplet = new HearingTest();
	    
	    theApplet.setStub(new MyAppletStub());
	  
	    theApplet.init();         
	    theApplet.start();        
 
	    //... Create a window (JFrame) and make applet the content pane.
	    JFrame window = new JFrame("Sample Applet and Application");
	    window.setSize(500, 500);
	    window.setContentPane(theApplet);
	    window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	    window.pack();              // Arrange the components.
	
	    window.setVisible(true);    // Make the window visible.
	}
	
}
 
Code Snippet 2:
 
  <applet
  code     = "graph.AppletViewerTest"
  archive  = "AppletViewerTest.jar"
  codebase = "."
>
              </applet>

Open in new window

0
Comment
Question by:Lexx87
  • 10
  • 6
  • 3
19 Comments
 
LVL 92

Expert Comment

by:objects
ID: 24202648
>   code     = "graph.AppletViewerTest"

you're running the wrong class, should be running HearintTest

  code     = "graph.HearingTest"

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24202665
>>public class AppletViewerTest

should be

public class AppletViewerTest extends Applet
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24202692
... but you couldn't run that through the browser using the main method, so you need to operate on HearingTest directly in your html
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Lexx87
ID: 24202745
I did think it needed to be HearingTest as the class, but doing so led to a a blank screen with no error. Just tested this again and the Java loading thing appeared and seem to crash, reloading the page led to just a blank white box again where the applet should be.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24202753
Enable the Java applet console and post the errors here
0
 
LVL 92

Expert Comment

by:objects
ID: 24202771
> Now I believe I have done everything necessary in turning an applet into a runnable application, so it can be made into a JAR and signed and run on a browser.

you don't need to turn it into an application to run it in your browser, it has to be an applet to do that.

the blank screen suggests thhere is a problem with your applet

0
 

Author Comment

by:Lexx87
ID: 24202790
I do need to do that to run it in the browser, as to run the applet needs signing (as it reads to and from a database) and the only way to do that is to make an application of it so I can create a .JAR file. Well, according to my findings anyway.

The HearingTest applet runs under Eclipse fine just to add, no problems in the IDE.
0
 

Author Comment

by:Lexx87
ID: 24202797
Well the OP shows the error from the console with the archive is the correct jar file, while i've used the incorrect class.

While:
   <applet
  code     = "graph.HearingTest"
  archive  = "AppletViewerTest.jar"
  codebase = "."
>
 </applet>

This does not load an error or anything at all! Just a blank white box with no reported error.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24202802
You don't need to make it an app to sign it
0
 
LVL 92

Expert Comment

by:objects
ID: 24202814
> Well, according to my findings anyway.

they are incorrect, you do not need to convert it to an application to achieve that.


0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24202842
>>This does not load an error or anything at all! Just a blank white box with no reported error.

Is there meant to be anything visible?
0
 

Author Comment

by:Lexx87
ID: 24202901
Yeah it's just four buttons basically which do different things, which as I say runs and works no problem in Eclipse as the applet and the application version I created.

So I believed I couldn't make the Applet signable as I thought a JAR needed a main class to work, and the only way to provide a main class  is to make it an application.

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24202919
>>as I thought a JAR needed a main class to work

No. The first thing you need to find out is why there's no GUI. Can you post the HearingTest code (snippet window please)?
0
 

Author Comment

by:Lexx87
ID: 24202932
Done, and as I say this works inside Eclipse no problem and did work in the browser before I added the database connectivity stuff and the thing needed signing.
public class HearingTest extends Applet {
 
	
  
	private static final long serialVersionUID = -6851166417035992021L;
 
	//need to add '105' clips to the array for them to work. 
	//All the clips to be used are called here
	private AudioClip c10, c11, c12, c13, c14, c15, c16, c250Hz0dB, c250Hz10dB,
    c250Hz20dB, c250Hz30dB, c250Hz40dB, c250Hz50dB, c250Hz60dB,
    c500Hz0dB, c500Hz10dB, c52, c53, c54, c55, c56, c20, c21, c22, c23,
    c24, c25, c26, c40, c41, c42, c43, c44, c45, c46, c60, c61, c62,
    c63, c64, c65, c66, c80, c81, c82, c83, c84, c85, c86;
int index = 0;  //index for array of clips
AudioClip arrayOfClips[];
//private String[] deciNames;
private int[] deciNames;
 
 
 
 
public static LinkedList pickedClips = new LinkedList();
 
 
 
private Label label;
private Connection connection;
private Statement  statement;
private ResultSet  rs;
private String test;
 
 
 
public HearingTest() {
    try {
      Class.forName("com.mysql.jdbc.Driver").newInstance();
    } catch (Exception  e) {
      System.err.println("Unable to find and load driver");
      System.exit(1);
    }
  }
 
 
// Initialize the applet
public void init() {
try {
	connectToDB();
    jbInit();
} catch (Exception e) {
    e.printStackTrace();
}
}
 
// Component initialization
private void jbInit() throws Exception {
 
//each clip called is given a url from the .html file directory
c10 = newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine1000Hz3s-60dBFSmono.wav"));
c11 = newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine1000Hz3s-50dBFSmono.wav"));
c12 = newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine1000Hz3s-40dBFSmono.wav"));
c13 = newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine1000Hz3s-30dBFSmono.wav"));
c14 = newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine1000Hz3s-20dBFSmono.wav"));
c15 = newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine1000Hz3s-10dBFSmono.wav"));
c16 = newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine1000Hz3s0dBFSmono.wav"));
 
c250Hz0dB = java.applet.Applet.newAudioClip(new java.net.URL(
        getCodeBase(),
        "3sSine250Hz3s-60dBFSmono.wav"));
c250Hz10dB = java.applet.Applet.newAudioClip(new java.net.URL(
        getCodeBase(),
        "3sSine250Hz3s-50dBFSmono.wav"));
c250Hz20dB = java.applet.Applet.newAudioClip(new java.net.URL(
        getCodeBase(),
        "3sSine250Hz3s-40dBFSmono.wav"));
c250Hz30dB = java.applet.Applet.newAudioClip(new java.net.URL(
        getCodeBase(),
        "3sSine250Hz3s-30dBFSmono.wav"));
c250Hz40dB = java.applet.Applet.newAudioClip(new java.net.URL(
        getCodeBase(),
        "3sSine250Hz3s-20dBFSmono.wav"));
c250Hz50dB = java.applet.Applet.newAudioClip(new java.net.URL(
        getCodeBase(),
        "3sSine250Hz3s-10dBFSmono.wav"));
c250Hz60dB = java.applet.Applet.newAudioClip(new java.net.URL(
        getCodeBase(),
        "3sSine250Hz3s0dBFSmono.wav"));
 
c500Hz0dB = java.applet.Applet.newAudioClip(new java.net.URL(
        getCodeBase(),
        "3sSine500Hz3s-60dBFSmono.wav"));
c500Hz10dB = java.applet.Applet.newAudioClip(new java.net.URL(
        getCodeBase(),
        "3sSine500Hz3s-50dBFSmono.wav"));
c52 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine500Hz3s-40dBFSmono.wav"));
c53 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine500Hz3s-30dBFSmono.wav"));
c54 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine500Hz3s-20dBFSmono.wav"));
c55 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine500Hz3s-10dBFSmono.wav"));
c56 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine500Hz3s0dBFSmono.wav"));
 
c20 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine2000Hz3s-60dBFSmono.wav"));
c21 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine2000Hz3s-50dBFSmono.wav"));
c22 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine2000Hz3s-40dBFSmono.wav"));
c23 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine2000Hz3s-30dBFSmono.wav"));
c24 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine2000Hz3s-20dBFSmono.wav"));
c25 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine2000Hz3s-10dBFSmono.wav"));
c26 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine2000Hz3s0dBFSmono.wav"));
 
c40 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine4000Hz3s-60dBFSmono.wav"));
c41 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine4000Hz3s-50dBFSmono.wav"));
c42 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine4000Hz3s-40dBFSmono.wav"));
c43 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine4000Hz3s-30dBFSmono.wav"));
c44 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine4000Hz3s-20dBFSmono.wav"));
c45 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine4000Hz3s-10dBFSmono.wav"));
c46 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3sSine4000Hz3s0dBFSmono.wav"));
 
c60 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3s Sine 8000Hz 3s -60dBFS mono.wav"));
c61 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3s Sine 8000Hz 3s -50dBFS mono.wav"));
c62 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3s Sine 8000Hz 3s -40dBFS mono.wav"));
c63 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3s Sine 8000Hz 3s -30dBFS mono.wav"));
c64 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3s Sine 8000Hz 3s -20dBFS mono.wav"));
c65 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3s Sine 8000Hz 3s -10dBFS mono.wav"));
c66 = java.applet.Applet.newAudioClip(new java.net.URL(getCodeBase(),
        "3s Sine 8000Hz 3s 0dBFS mono.wav"));
 
//clips are given a name so they can be printed out as a result to the user
deciNames = new int[] {
		
	        //1000Hz	
		    0,
            10, 20,
            30, 40,
            50,60,
            //250Hz
            0,
            10, 20,
            30, 40,
            50,60,
            //500Hz
            0,
            10, 20,
            30, 40,
            50,60,
            //2000Hz
            0,
            10, 20,
            30, 40,
            50,60,
            //4000Hz	
            0,
            10, 20,
            30, 40,
            50,60,
            //8000Hz
            0,
            10, 20,
            30, 40,
            50,60
};
//Holds all the clips in an array
arrayOfClips = new AudioClip[] {c10, c11, c12, c13, c14, c15, c16,
        c250Hz0dB, c250Hz10dB,
        c250Hz20dB, c250Hz30dB, c250Hz40dB, c250Hz50dB,
        c250Hz60dB, c500Hz0dB, c500Hz10dB, c52, c53, c54, c55,
        c56, c20,
        c21, c22, c23, c24, c25, c26, c40, c41, c42, c43, c44,
        c45, c46, c60,
        c61, c62,
        c63, c64, c65, c66, c80, c81, c82, c83, c84, c85, c86};
 
        {
    		//Set Look & Feel
    		try {
    			{
	    			this.setBackground(new java.awt.Color(244,255,228));
    			}
    			javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
    		} catch(Exception e) {
    			e.printStackTrace();
    		}
    	}
        
     
//creates new button 'bnStart' and gives it a name
        Button bnStart = new Button("Begin Test"){
            public Dimension getPreferredSize() {
                return new Dimension(100, 50);
            }
        };
 
        //adds the button and tells it where to be positioned
        add(bnStart, BorderLayout.CENTER);
//adds an action listener to the button to call the doStart method
        bnStart.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                doStart();
            }
        });
//creates a new button 'button' and prints a name ClickMe on it
        Button button = new Button("Click Me") { // add the button to the Applet
        
			private static final long serialVersionUID = -6466332360037915767L;
 
			 public Dimension getPreferredSize() {
                 return new Dimension(100, 100);
             }
         };
        //creates new button 'bnPause' and gives it a name
        Button bnPause = new Button("Pause Test"){
        public Dimension getPreferredSize() {
            return new Dimension(100, 50);
        }
    };
 
        //adds the button and tells it where to be positioned
        add(bnPause, BorderLayout.EAST);
//adds an action listener to the button to call the doStart method
        bnPause.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
            	
					arrayOfClips[index].stop();
            }	
        });
       
      //creates new button 'bnPause' and gives it a name
        Button bnContinue = new Button("Continue"){
            public Dimension getPreferredSize() {
                return new Dimension(100, 50);
            }
        };
 
        //adds the button and tells it where to be positioned
        add(bnContinue, BorderLayout.SOUTH);
//adds an action listener to the button to call the doStart method
        bnContinue.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
            	
					arrayOfClips[index].play();
            }	
        });
//creates a new label
        label = new Label("");
//adds the button and label to the applet
        add(button, BorderLayout.WEST);
        add(label, BorderLayout.EAST);
//adds an action listener to the button
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
 
                button_actionPerformed(e);
//when an action is performed the clip name at the time of the action gets stored in the index.
                pickedClips.add(deciNames[index]);
            	String insertString1;
            	String insertString2;
            	String insertString3;
            	String insertString4;
            	String insertString5;
            	//test variable
            	String getString1;
            	
//tells the applet where to go when the user clicks on a certain tone
                if (index < 8) {
                    index = 8;
                    
                    connectToDB();
        
                    
                    insertString1 = " INSERT into user_data2 (username,Frequency,Decibel) values ('Lexx87', '1000Hz', '" + pickedClips.getFirst() +"') on duplicate key UPDATE Decibel2='" + pickedClips.getFirst()+ "' ";
                   
                    try{
                	   	
                 	   Statement statement =  connection.createStatement();
                 	   statement.executeUpdate(insertString1);
                 	
                 	  
                 	   statement.close();
                 	   connection.close();
                 	   
                    } catch(SQLException insertException) {
                        displaySQLErrors(insertException);
                      }
                    //TESTING USE
                    label.setText(pickedClips.toString());
                    label.setSize(300, 200);
                    //Getting data test
                   
                    //Inserting correct data test
                    System.out.println("Inserted " + insertString1 + " rows successfully");
                    
                } else if (index < 15) {
                    index = 15;
                    connectToDB();
                    insertString2 = " INSERT into user_data2 (username,Frequency,Decibel) values ('Lexx87', '250Hz', '" + pickedClips.get(1) +"') on duplicate key UPDATE Decibel2='" + pickedClips.get(1)+ "'";
                    try{
                	   	
                 	   Statement statement = connection.createStatement();
                 	   statement.executeUpdate(insertString2);
                 	   statement.close();
                 	   connection.close();
                 	   
                    } catch(SQLException insertException) {
                        displaySQLErrors(insertException);
                      }
                    //TESTING USE
                    label.setText(pickedClips.toString());
                    label.setSize(300, 200);
                   System.out.println("Inserted " + insertString2 + " rows successfully");
                    
                } else if (index < 22) {
                    index = 22;
             
                    connectToDB();
                    insertString3 = " INSERT into user_data2 (username,Frequency,Decibel) values ('Lexx87', '500Hz', '" + pickedClips.get(2) +"') on duplicate key UPDATE Decibel2='" + pickedClips.get(2)+"'";
                    try{
                	   	
                 	   Statement statement = connection.createStatement();
                 	   statement.executeUpdate(insertString3);
                 	   statement.close();
                 	   connection.close();
                 	   
                    } catch(SQLException insertException) {
                        displaySQLErrors(insertException);
                      }
                    //TESTING USE
                    label.setText(pickedClips.toString());
                    label.setSize(300, 200);
                    System.out.println("Inserted " + insertString3 + " rows successfully");
                    
                } else if (index < 29) {
                    index = 29;
                    
                    connectToDB();
                    insertString4 = " INSERT into user_data2 (username,Frequency,Decibel) values ('Lexx87', '2000Hz', '" + pickedClips.get(3) +"') on duplicate key UPDATE Decibel2='" + pickedClips.get(3)+"'";
                    try{
                	   	
                 	   Statement statement = connection.createStatement();
                 	   statement.executeUpdate(insertString4);
                 	   statement.close();
                 	   connection.close();
                 	   
                    } catch(SQLException insertException) {
                        displaySQLErrors(insertException);
                      }
                    //TESTING USE
                    label.setText(pickedClips.toString());
                    label.setSize(300, 200);
                    System.out.println("Inserted " + insertString4 + " rows successfully");
                } else if (index < 36) {
                  index = 42;
                  
                  connectToDB();
                  
                  insertString5 = " INSERT into user_data2 (username,Frequency,Decibel) values ('Lexx87', '4000Hz', '" + pickedClips.get(4) +"') on duplicate key UPDATE Decibel2='" + pickedClips.getLast()+"'";
                  try{
              	   	
               	   Statement statement = connection.createStatement();
               	   statement.executeUpdate(insertString5);
               	  // statement.executeUpdate(getString1);
               	   statement.close();
               	   connection.close();
               	   
                  } catch(SQLException insertException) {
                      displaySQLErrors(insertException);
                    }
                  //TESTING USE
                  label.setText(pickedClips.toString());
                  label.setSize(300, 200);
               
                  System.out.println("Inserted " + insertString5 + " rows successfully");
             
  
                  //sets the label to output string information
                    label.setText(pickedClips.toString());
                    label.setSize(300, 200);
                    System.out.println("Here are your test Results");
                    //prints the selected clips
                    
                    
                    
             
            }
            }
        });
 
    }
 
//start methof for the browser
    public void start() {
 
    }
//doStart method
    public void doStart() {
// creates a new Thread "thread"
        thread = new Thread() {
          //runs
        	public void run() {
                //gives a random time setting
                  Random random = new Random(System.currentTimeMillis());
                 //while the index starting from 0 is less than the total number
                 //of clips it will keep adding 1 to the index and play the clips
                 //untill the index reaches 42
 
                  while (index < arrayOfClips.length) {
                      arrayOfClips[index].play();
                      int time = random.nextInt(1000) + 3000;
                      try {
                          Thread.sleep(time);
                      } catch (InterruptedException ex) {
                          return;
                      }
 
                      arrayOfClips[index].stop();
 
                      try {
                          Thread.sleep(time);
                      } catch (InterruptedException ex) {
                          return;
                      }
                      index++;
                  }
              }
          };
 
          thread.start();
      }
    
    public void connectToDB() {
        try {
          connection = DriverManager.getConnection(
            "jdbc:mysql://localhost/auth?user=root&password=");
          statement = connection.createStatement();
 
        } catch(SQLException connectException) {
          System.out.println(connectException.getMessage());
          System.out.println(connectException.getSQLState());
          System.out.println(connectException.getErrorCode());
          System.exit(1);
        }
       }
    
    private void displaySQLErrors(SQLException e) {
        label.setText("SQLException: " + e.getMessage() + "\n");
        label.setText("SQLState:     " + e.getSQLState() + "\n");
        label.setText("VendorError:  " + e.getErrorCode() + "\n");   
      }
//allows the browser to stop the applet when the page is left
    private Thread thread;
    public void stop() {
        if (thread != null) {
            thread.interrupt();
        }
    }
    
    public void button_actionPerformed(ActionEvent e) {
 
    }
}

Open in new window

0
 
LVL 86

Accepted Solution

by:
CEHJ earned 600 total points
ID: 24203029
>>
  //adds the button and tells it where to be positioned
        add(bnStart, BorderLayout.CENTER);
>>

You have not set a BorderLayout on the applet - and be careful -even when you do, you are adding different components in the same position

>>System.exit(1);

You need to get rid of those: not valid in an applet

>>
    //start methof for the browser
    public void start() {

    }  
>>

You override start and do nothing. Get rid of that for now
0
 

Author Comment

by:Lexx87
ID: 24203143
Hey that seems to have done it :)

I cannot believe I was so, well, stupid! Why I thought a JAR needed a main class I don't know, I guess random forum searching can give you several different answers leading to confusion. So really all that work making an application out of it wasn't needed, at all :p

But hey it might come in useful at some point!

Thank you once again, I shouldn't need anymore help so I won't bug you again at least for now!

A|lex
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24203299
:-)

>>Why I thought a JAR needed a main class I don't know

A jar is just a group of classes. An *executable* jar *does* not a main class
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24203302
>>*does* not a main class

should have been

*does* need a main class
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month18 days, 19 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question