![]() |
|
Submit Java Questions |
|
Interrelated Information Technology |
|
| WebSphere Questions | WebLogic Questions |
| Oracle Questions | DB2 Questions |
| CICS Questions | XML Questions |
The Computer Education Techniques knowledge base is a service for answering questions, inclusive of the research and validation of the accuracy of information in the public domain. Citation of source documentation and examples are used to provide answers to the questions. Utilization of the information of this service and reliance on the answers, information or other materials received through this web site is done at your own risk.
| Q | What is the least expensive and efficient way for our organization to code some simple Java programs and evaluate the Java programming language? |
| A | Our recommendation would be to read the free Java tutorial, at http://java.sun.com/docs/books/tutorial/index.html. |
| Q |
My "Hello World!" program run will not execute. Do you have any recommendations? |
||||||||||
| A |
There are five common mistakes that will result in a VM (java or browser) being unable to execute your classes:
|
| Q | How do I set the CLASSPATH? | ||||
| A | The CLASSPATH environment
variable tells the VM's class loader where to find classes that are directly
or indirectly invoked, including system classes. The CLASSPATH variable should:
It is a requirement to separate multiple paths and archives with a platform-specific separator:" " for Windows; ":" for UNIX.
|
| Q | How are two Float objects added together? |
| A | It would seem that
straightforward coding would be: Float One; Float Two; Float Hard = One + Two; but the compiler does not allow it. Java has two separate ways of representing a 32 bit floating point number, Float and float.
If all that is required of the floating point numbers is arithmetic, then they should be declared to be "float". If the floating point numbers are to be used as object, then they should be declared as "Float". The decision should be based upon predominant use. If both are required, then they will need to be declare one way and converted whenever the capabilities of the other are needed. The specific code can be written as: Float One = new Float(1.0); |
| Q | How do I calculate the number of days between two dates? |
| A | There is no API for this;
however there should be! The following code can be used for performing the calculation: static final long ONE_HOUR = 60 * 60 *
1000L; long duration =
laterDate.getTime().getTime() - long nDays = ( duration + ONE_HOUR ) /
(24 * ONE_HOUR); |
| Q | Does Java have the equivalent of "const" arguments in C and C++? |
| A | Java 1.1 added the ability to
use the "final" keyword to make arguments constant. When used to qualify a reference type, however, this keyword indicates that the reference is constant; this is , not that the object or array referred to is constant. |
| Q | Do I need to know C++ to learn Java? |
| A | No. Java is an easier language to learn than C++. And C++ is not a prerequisite. However, SYS-ED does offer multiple levels of both programming languages. |
| Q |
What exactly is JavaScript? JavaScript is a subset of Java, right? |
| A |
Java and JavaScript both have the word Java in their names. JavaScript is a programming language from Netscape which is incorporated in their browsers. It is superficially similar to Java; but in fact there are a number of differences. |
| Q |
What is the difference between an application and applet? |
| A | An application is a Java class
that has a main() method. An applet is a Java class which extends
java.applet.Applet. A class which extends java.applet.Applet and also has a
main() method is both an application and applet.
|
| Q |
My company requires that I receive Java training - ASAP. I want to be sure that the training will be on the identical release that I will be using back on the job. |
| A | The Java programming language
is currently shipping from Sun Microsystems, Inc. as the Java 2 SDK and Java
2 Runtime Environment. Each release of the Java 2 SDK, Standard Edition contains:
It is SYS-ED policy to train on the latest release of the product. However, we will upon request install older versions of the product for use in our workshops. |
| Q |
My company makes extensive use of Java tools for application development and debugging? Will these tools be available in SYS-ED’s Java courses? |
| A | Yes, we provide complete
support and utilization of JUnit, Ant, XDoclet, Struts, JBuilder, Tomcat,
and JEdit. Moreover, we support all the major tools; but for many of the more substantial tools we offer standalone courses just for that tool. And we are committed to being first in line when it comes to using the new tools. |
| Q |
Will SYS-ED courses prepare me for certification exams? |
| A | Yes, SYS-ED Java training programs
and Java boot camps can be taught to prepare participants to pass
certification examinations. Our restricted enrollment 3-, 4- ,5-day courses are not oriented to certification. |
| Q |
Our shop has made a substantial investment in Microsoft APIs and development platforms. Which SYS-ED Java course will provide the expertise and content that I need in order to convert my Java classes to an executable .exe file for Windows? |
| A | Depending on your operational objectives, we have several courses. FYI, Microsoft provides a free system development kit (SDK), for Java, which includes the jexegen tool. This will convert class files into .exe files. |