Solved

convert a java app to a bean instead

Posted on 2001-07-29
13
265 Views
Last Modified: 2013-11-23
This is my java standalone program that read a xml doc and print out all values

import javax.xml.transform.TransformerException;
import org.w3c.dom.Node;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import org.apache.xerces.parsers.DOMParser;
import org.apache.xpath.XPathAPI;
import java.io.StringReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.FileReader;
import org.xml.sax.InputSource;

public class test3
{
    public static void main (String argv[]) throws Exception
    {
        String ticket_num;
        String message;
        String type;
        String from;
        String to;
        String msg_num;
        String msg_text;
        String options;
        String remarks;

        String xml = "test2.xml";
        String ticket_num_xpath = "/unibroker/header/ticket_num/text()";
        String message_xpath = "/unibroker/header/message/text()";
        String type_xpath = "/unibroker/header/type/text()";
        String from_xpath = "/unibroker/header/from/text()";
        String to_xpath = "/unibroker/header/to/text()";
        String function_xpath= "/unibroker/header/function/text()";
        String msg_num_xpath = "/unibroker/body/";
        String msg_text_xpath = "/unibroker/body/";
        String options_xpath = "/unibroker/footer/options/text()";
        String remarks_xpath = "/unibroker/footer/remarks/text()";

        String msg_function;

        msg_function = getFunctionId(xml, function_xpath);

        DOMParser parser = new DOMParser();

        parser.parse(new InputSource(new FileReader(xml)));
        Node node = parser.getDocument();

        ticket_num =  XPathAPI.selectSingleNode(node, ticket_num_xpath).getNodeValue();
        message = XPathAPI.selectSingleNode(node, message_xpath).getNodeValue();
        type = XPathAPI.selectSingleNode(node, type_xpath).getNodeValue();
        from = XPathAPI.selectSingleNode(node, from_xpath).getNodeValue();
        to = XPathAPI.selectSingleNode(node, to_xpath).getNodeValue();

        msg_num_xpath = msg_num_xpath + msg_function + "/t_4076/text()";
        msg_num = XPathAPI.selectSingleNode(node, msg_num_xpath).getNodeValue();

        msg_text_xpath = msg_text_xpath + msg_function + "/t_3076/text()";
        msg_text = XPathAPI.selectSingleNode(node, msg_text_xpath).getNodeValue();

        System.out.println("ticketnum-->"+ticket_num);
        System.out.println("function-->"+msg_function);
        System.out.println("message-->"+message);
        System.out.println("type-->"+type);
        System.out.println("from-->"+from);
        System.out.println("to-->"+to);
        System.out.println("msg_num-->"+msg_num);
        System.out.println("msg_text-->"+msg_text);


    }


 private static  String getFunctionId(String xml, String xpath) throws Exception
 {
         DOMParser parser = new DOMParser();

         parser.parse(new InputSource(new FileReader(xml)));

         Node node = parser.getDocument();
         Node subNode = XPathAPI.selectSingleNode(node,xpath);

         return (subNode.getNodeValue());

 }
}




Now i want to convert it to a java bean so that I can call from a jsp page.

So how to convert it ?
0
Comment
Question by:adrianmak
  • 7
  • 6
13 Comments
 
LVL 3

Expert Comment

by:black
ID: 6332991
Do you want the following variable to be set via a form or by the JSP?

       String xml = "test2.xml";
       String ticket_num_xpath = "/unibroker/header/ticket_num/text()";
       String message_xpath = "/unibroker/header/message/text()";
       String type_xpath = "/unibroker/header/type/text()";
       String from_xpath = "/unibroker/header/from/text()";
       String to_xpath = "/unibroker/header/to/text()";
       String function_xpath= "/unibroker/header/function/text()";
       String msg_num_xpath = "/unibroker/body/";
       String msg_text_xpath = "/unibroker/body/";
       String options_xpath = "/unibroker/footer/options/text()";
       String remarks_xpath = "/unibroker/footer/remarks/text()";


or are they always fixed?

If they are fixed/hardcoded just declare them to be static final.

Implement the bean standard by having getters and setters for all the variable you want to use in the bean.
You can can do any calculations you want to perform in your getXXX method.
You've already got all the code there so it's just a matter of writing getters and setters for all the variables you want to use in your JSP.
0
 
LVL 3

Accepted Solution

by:
black earned 20 total points
ID: 6333017
here's an example for ticket_num variable:

//start code
import javax.xml.transform.TransformerException;
import org.w3c.dom.Node;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import org.apache.xerces.parsers.DOMParser;
import org.apache.xpath.XPathAPI;
import java.io.StringReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.FileReader;
import org.xml.sax.InputSource;

public class test3
{

     private String ticket_num;

     public void setTicket_Num(String ticket_num) {
          this.ticket_num = ticket_num;
     }
     
     public String getTicket_Num() {
          if(ticket_num == null) {
               calculate();
          }
          return ticket_num;
     }
     
     private void calculate() {
           String msg_function;
           String message;
           String type;
           String from;
           String to;
           String msg_num;
           String msg_text;
           String remarks;

           String options;
           String xml = "test2.xml";
           String ticket_num_xpath = "/unibroker/header/ticket_num/text()";
           String message_xpath = "/unibroker/header/message/text()";
           String type_xpath = "/unibroker/header/type/text()";
           String from_xpath = "/unibroker/header/from/text()";
           String to_xpath = "/unibroker/header/to/text()";
           String function_xpath= "/unibroker/header/function/text()";
           String msg_num_xpath = "/unibroker/body/";
           String msg_text_xpath = "/unibroker/body/";
           String options_xpath = "/unibroker/footer/options/text()";
           String remarks_xpath = "/unibroker/footer/remarks/text()";


           msg_function = getFunctionId(xml, function_xpath);

           DOMParser parser = new DOMParser();

           parser.parse(new InputSource(new FileReader(xml)));
           Node node = parser.getDocument();

           ticket_num =  XPathAPI.selectSingleNode(node, ticket_num_xpath).getNodeValue();
           message = XPathAPI.selectSingleNode(node, message_xpath).getNodeValue();
           type = XPathAPI.selectSingleNode(node, type_xpath).getNodeValue();
           from = XPathAPI.selectSingleNode(node, from_xpath).getNodeValue();
           to = XPathAPI.selectSingleNode(node, to_xpath).getNodeValue();

           msg_num_xpath = msg_num_xpath + msg_function + "/t_4076/text()";
           msg_num = XPathAPI.selectSingleNode(node, msg_num_xpath).getNodeValue();

           msg_text_xpath = msg_text_xpath + msg_function + "/t_3076/text()";
           msg_text = XPathAPI.selectSingleNode(node, msg_text_xpath).getNodeValue();
     }

     private static  String getFunctionId(String xml, String xpath) throws Exception
     {
          DOMParser parser = new DOMParser();

          parser.parse(new InputSource(new FileReader(xml)));

          Node node = parser.getDocument();
          Node subNode = XPathAPI.selectSingleNode(node,xpath);

          return (subNode.getNodeValue());
     }

}
//end code

Note that I've made ticket_num a private variable with a public getter and a setter, the getter calls the calculate method if ticket_num is null.
within the JSP you can use the jsp use bean tag to create a bean, the set and get property tags to get and set the values, here's a link to the syntax for the tags:
http://java.sun.com/products/jsp/tags/10/tags.html
0
 

Author Comment

by:adrianmak
ID: 6333074
Sorry, this bean just for getting values from variables

          String msg_function;
          String message;
          String type;
          String from;
          String to;
          String msg_num;
          String msg_text;
          String remarks;

These variables' values are get by retrieving the xml document node values

Therefore set variable is not necessary
0
ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 
LVL 3

Expert Comment

by:black
ID: 6333125
in that case just have getXXX methods for the aforementioned variables.
Check to see if it's null before doing the calculation that way it's only done once.
Have the calculate method set each of the values.
0
 
LVL 3

Expert Comment

by:black
ID: 6333127
try the following tag's in your JSP:
<jsp:useBean id="myBean" scope="session" class="test3" />
The message number is: <jsp:getProperty name="myBean" property="msg_num" />

ensure you test3 has the following method:

public String getMsg_Num() {
  if(msg_num == null) {
    calculate();
  }
  return msg_num;
}
0
 

Author Comment

by:adrianmak
ID: 6333185
instead of using the set and get property, is there any method to set and get the bean variable

I found some people using their own method to set and get  bean value like using a java class
say in jsp

<?    test3 abc  = new test3();

            abc.calculate();

   String ticketnum = get_ticket_num();

?>

Can I using these ways to accessing the bean ? If yes , how ?
0
 
LVL 3

Expert Comment

by:black
ID: 6333227
Yes, you can just do this:
<%
test2 myBean = new test3();
myBean.calculate();
String ticketnum = myBean.getTicket_Num();
%>

the tags are just a short hand way, it avoids doing scripts like above which are messy.
for example
test2 myBean = new Test3();
is equivalent to:
<jsp:useBean id="myBean" scope="session" class="test3" />
and
out.println(myBean.getTicket_Num());
is equivalent to:
<jsp:getProperty name="myBean" property="msg_num" />

Just remember a java bean is just a class you can instantiate it and call it's method like any other.
0
 
LVL 3

Expert Comment

by:black
ID: 6333231
sorry I've got a typo in the above
the line:
<jsp:getProperty name="myBean" property="msg_num" />
should read:
<jsp:getProperty name="myBean" property="ticket_num" />
0
 

Author Comment

by:adrianmak
ID: 6333308
that means if I using this way

test2 myBean = new test3();

to init the java bean
then

<jsp:useBean id="myBean" scope="session" class="test3" />

this jsp tag is not necessary ? right ?


But how about is there any different in coding the java bean between these two methods ?

Should I define a constructor if I using
test2 mybean = new test3()



0
 

Author Comment

by:adrianmak
ID: 6333405
that means if I using this way

test2 myBean = new test3();

to init the java bean
then

<jsp:useBean id="myBean" scope="session" class="test3" />

this jsp tag is not necessary ? right ?


But how about is there any different in coding the java bean between these two methods ?

Should I define a constructor if I using
test2 mybean = new test3()



0
 

Author Comment

by:adrianmak
ID: 6333511
While I access the jsp page thru a browser, i got server error

Error: 500
Location: /unibroker2/jsp/InvalidCommandResponse.jsp
Internal Servlet Error:

java.lang.IllegalStateException: Response has already been committed
      at org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:157)
      at org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java:299)
      at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:377)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
      at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
      at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
      at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
      at java.lang.Thread.run(Unknown Source)


and the tomcat console has following error output

Unhandled error! You might want to consider having an error page to report such
errors more gracefully
java.lang.NoSuchMethodError
        at org.apache.xpath.axes.RootWalkerMultiStep.getNextNode(RootWalkerMulti
Step.java:108)
        at org.apache.xpath.axes.ChildWalkerMultiStep.nextNode(ChildWalkerMultiS
tep.java:147)
        at org.apache.xpath.axes.LocPathIterator.nextNode(LocPathIterator.java:6
89)
        at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:123)
        at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:100)
        at test3bean.getFunctionId(test3bean.java:106)
        at test3bean.processData(test3bean.java:79)
        at jsp._0002fjsp_0002fInvalidCommandResponse_0002ejspInvalidCommandRespo
nse_jsp_16._jspService(_0002fjsp_0002fInvalidCommandResponse_0002ejspInvalidComm
andResponse_jsp_16.java:73)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspSer
vlet.java:174)
        at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:2
61)
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.ja
va:503)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559
)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:160)
        at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.j
ava:338)
        at java.lang.Thread.run(Unknown Source)



-----------------------------------------
this is my jsp page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page import = "test3bean"%>
<html>
<head>
<title>Order Input EverBright</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF">

<%

//  InvalidCommandResponseBean = new InvalidCommandResponseBean();


    test3bean abc = new test3bean();
  String result;

  abc.processData();
//  result = InvalidCommandResponseBean.processData();

// out.println("222222");
%>


2  dsdsd  11
</body>
</html>



------------------------------------------------
this is my bean
import javax.xml.transform.TransformerException;
import org.w3c.dom.Node;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import org.apache.xerces.parsers.DOMParser;
import org.apache.xpath.XPathAPI;
import java.io.StringReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.FileReader;
import org.xml.sax.InputSource;

public class test3bean extends BasicCmdBean
{

    private String ticket_num;
    private String msg_function;
    private String message;
    private String type;
    private String from;
    private String to;
    private String msg_num;
    private String msg_text;
    private String remarks;
    private String options;

public test3bean() throws BeansCmdException, Exception
{      super();
}




    public String getticket_num() {
         return ticket_num;
    }
    public String getmsg_function() {
         return msg_function;
    }
    public String getmessage() {
         return message;
    }
    public String gettype() {
         return type;
    }
    public String getfrom() {
         return from;
    }
    public String getto() {
         return to;
    }
    public String getmsg_num() {
         return msg_num;
    }
    public String getmsg_text() {
         return msg_text;
    }
    public String getoptions() {
         return options;
    }
    public String getremarks() {
         return remarks;
    }

    public void processData() throws Exception {
          String xml = "e:/AMS3/pns_project/test2.xml";
          String ticket_num_xpath = "/unibroker/header/ticket_num/text()";
          String message_xpath = "/unibroker/header/message/text()";
          String type_xpath = "/unibroker/header/type/text()";
          String from_xpath = "/unibroker/header/from/text()";
          String to_xpath = "/unibroker/header/to/text()";
          String function_xpath= "/unibroker/header/function/text()";
          String msg_num_xpath = "/unibroker/body/";
          String msg_text_xpath = "/unibroker/body/";
          String options_xpath = "/unibroker/footer/options/text()";
          String remarks_xpath = "/unibroker/footer/remarks/text()";


          msg_function = getFunctionId(xml, function_xpath);

          DOMParser parser = new DOMParser();

          parser.parse(new InputSource(new FileReader(xml)));
          Node node = parser.getDocument();

          ticket_num =  XPathAPI.selectSingleNode(node, ticket_num_xpath).getNodeValue();
          message = XPathAPI.selectSingleNode(node, message_xpath).getNodeValue();
          type = XPathAPI.selectSingleNode(node, type_xpath).getNodeValue();
          from = XPathAPI.selectSingleNode(node, from_xpath).getNodeValue();
          to = XPathAPI.selectSingleNode(node, to_xpath).getNodeValue();

          msg_num_xpath = msg_num_xpath + msg_function + "/t_4076/text()";
          msg_num = XPathAPI.selectSingleNode(node, msg_num_xpath).getNodeValue();

          msg_text_xpath = msg_text_xpath + msg_function + "/t_3076/text()";
          msg_text = XPathAPI.selectSingleNode(node, msg_text_xpath).getNodeValue();
    }

    private String getFunctionId(String xml, String xpath) throws Exception
    {
         DOMParser parser = new DOMParser();

         parser.parse(new InputSource(new FileReader(xml)));

         Node node = parser.getDocument();
         Node subNode = XPathAPI.selectSingleNode(node,xpath);

         return (subNode.getNodeValue());
    }

}

0
 
LVL 3

Expert Comment

by:black
ID: 6334242
Ignore the first error it occurs because your first JSP writes some content and therefore commits the input and output streams, once that happens it can't redirect anywhere else. You get an error afterwards which tries to redirect to another page. So basically ignore the error on the top it's caused by the bottom error:
java.lang.NoSuchMethodError
       at org.apache.xpath.axes.RootWalkerMultiStep.getNextNode(RootWalkerMulti
Step.java:108)

You have to check your classpath on tomcat to make sure you've got all the neccessary classes/jar files you need.
The org.apache.xpath.axes.RootWalkerMultiStep class's getNextNode method on line 108 is calling a method on some class and that method does not exist. So make sure you are using the correct versions of these libraries and make sure all required jar files are in your lib directory.

The point on your code that you're calling the library class is:
  at test3bean.getFunctionId(test3bean.java:106)
basically line 106 on your test3bean class.

You're JSP is fine. Would be cleaner with JSP tags but fine nonetheless:)
0
 

Author Comment

by:adrianmak
ID: 6336413
this is my revised code

//import javax.xml.transform.TransformerException;
import org.w3c.dom.Node;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import org.apache.xerces.parsers.DOMParser;
import org.apache.xpath.XPathAPI;
import java.io.StringReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.FileReader;
import org.xml.sax.InputSource;

public class test3bean
{

    private String ticket_num;
    private String msg_function;
    private String message;
    private String type;
    private String from;
    private String to;
    private String msg_num;
    private String msg_text;
    private String remarks;
    private String options;
/*
public test3bean() throws BeansCmdException, Exception
{      super();
}
*/



    public String getticket_num() {
         return ticket_num;
    }
    public String getmsg_function() {
         return msg_function;
    }
    public String getmessage() {
         return message;
    }
    public String gettype() {
         return type;
    }
    public String getfrom() {
         return from;
    }
    public String getto() {
         return to;
    }
    public String getmsg_num() {
         return msg_num;
    }
    public String getmsg_text() {
         return msg_text;
    }
    public String getoptions() {
         return options;
    }
    public String getremarks() {
         return remarks;
    }

    public void processData() throws Exception {
          String xml = "e:/AMS3/pns_project/test2.xml";
          String ticket_num_xpath = "/unibroker/header/ticket_num/text()";
          String message_xpath = "/unibroker/header/message/text()";
          String type_xpath = "/unibroker/header/type/text()";
          String from_xpath = "/unibroker/header/from/text()";
          String to_xpath = "/unibroker/header/to/text()";
          String function_xpath= "/unibroker/header/function/text()";
          String msg_num_xpath = "/unibroker/body/";
          String msg_text_xpath = "/unibroker/body/";
          String options_xpath = "/unibroker/footer/options/text()";
          String remarks_xpath = "/unibroker/footer/remarks/text()";


//          msg_function = getFunctionId(xml, function_xpath);

          DOMParser parser = new DOMParser();

          parser.parse(new InputSource(new FileReader(xml)));
          Node node = parser.getDocument();

//          msg_function = getFunctionId(node, function_xpath);
            msg_function = XPathAPI.selectSingleNode(node, function_xpath).getNodeValue();
/*
          ticket_num =  XPathAPI.selectSingleNode(node, ticket_num_xpath).getNodeValue();
          message = XPathAPI.selectSingleNode(node, message_xpath).getNodeValue();
          type = XPathAPI.selectSingleNode(node, type_xpath).getNodeValue();
          from = XPathAPI.selectSingleNode(node, from_xpath).getNodeValue();
          to = XPathAPI.selectSingleNode(node, to_xpath).getNodeValue();

          msg_num_xpath = msg_num_xpath + msg_function + "/t_4076/text()";
          msg_num = XPathAPI.selectSingleNode(node, msg_num_xpath).getNodeValue();

          msg_text_xpath = msg_text_xpath + msg_function + "/t_3076/text()";
          msg_text = XPathAPI.selectSingleNode(node, msg_text_xpath).getNodeValue();
  */
          System.out.println("DSDSDS");
          System.out.println(function_xpath);
    }
/*
    public String getFunctionId(Node node, String xpath) throws Exception
    {
  //       DOMParser parser = new DOMParser();

    //     parser.parse(new InputSource(new FileReader(xml)));

      //   Node node = parser.getDocument();
//         Node subNode = XPathAPI.selectSingleNode(node,xpath);

           return (XPathAPI.selectSingleNode(node, xpath).getNodeValue());
//         return (subNode.getNodeValue());
    }

  */
}

-------------------------------
JSP PAGE
<%@ page import = "test3bean"%>
<html>
<head>
<title>Order Input EverBright</title>
</head>

<body bgcolor="#FFFFFF">

<%

//  InvalidCommandResponseBean = new InvalidCommandResponseBean();


    test3bean abc = new test3bean();

  String result;

  abc.processData();
//  result = InvalidCommandResponseBean.processData();

 out.println("222222");
%>



</body>
</html>


------------------------------
Don't why once I called the XPathAPI.selectSingleNode()
method, the two errors occur

I have set all jar to the classpath before starting tomcat


this is my classpath I was set:-

set classpath=%classpath%;e:/AMS3/pns_project/WEB-INF/lib;e:/AMS3/pns_project;e:/AMS3/pns_project/WEB-INF/classes;e:/unibroker2/everbright2/WEB-INF/lib/servlet.jar;e:/unibroker2/everbright2/WEB-INF/lib/broker.jar;e:/unibroker2/everbright2/WEB-INF/lib/gnu-regexp-1.1.1.jar;e:/unibroker2/everbright2/WEB-INF/lib/jakarta-oro-2.0.3.jar;e:/unibroker2/everbright2/WEB-INF/libjdom-B6.jar;e:/unibroker2/everbright2/WEB-INF/lib/jms.jar;e:/unibroker2/everbright2/WEB-INF/lib/jservlet_ren.jar;e:/unibroker2/everbright2/WEB-INF/lib/oraJDBC.jar;e:/unibroker2/everbright2/WEB-INF/lib/protomatter-1.1.5.jar;e:/unibroker2/everbright2/WEB-INF/lib/smqclient.jar;e:/unibroker2/everbright2/WEB-INF/lib/swiftmq.jar;e:/unibroker2/everbright2/WEB-INF/lib/unibroker2.jar;e:/unibroker2/everbright2/WEB-INF/lib/unibroker2_admin.jar;e:/unibroker2/everbright2/WEB-INF/lib/webclient.jar;e:/unibroker2/everbright2/WEB-INF/lib/xalan.jar;e:/unibroker2/everbright2/WEB-INF/lib/XMLWriter.jar;c:/xerces-1_4_2/xerces.jar
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
rhino JavaScript import, load 25 84
more than one jdk and one jre 1 41
How to convert String matching to regex in java 4 34
configure dependency in POM for new database 3 26
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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.

803 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