Although the details of each step may differ depending on whether you are using a Java development tool, the steps involved in creating your own class generally include the following steps:
Define your class.
Write the Java code that defines your class.
Name and save your class.
Save your class declaration (Java code) in a file with the extension .java. Make certain the name of the file is the same as the name of the class and that the case of both names is identical.
For example, a class called Utility should be saved in a file called Utility.java.
Compile your class.
This step turns your class declaration containing Java code into a new, separate file containing byte code. The name of the new file is the same as the Java code file, but has an extension of .class. You can run a compiled Java class in a Java Runtime Environment, regardless of the platform you compiled it on or the operating system of the runtime environment.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|