Šablona třídy v Javě
Šablona nového souboru *.java
HelloWorld - základ
// Java Application created RRRR-MM; updated RRRR-MM;
/** Routine description.
* @author Name
* @version 1.0.0
* Routine detailed description.
*/
import java.util.*;
import java.io.*;
import java.lang.*;
public class ClassName {
public static void main(String[] args) {
// ToDo application code here
System.out.println("Text to print.");
} // End of the main method
} // End of the public class
Více kódu, rozvinutý základ
// Java Application created RRRR-MM; updated RRRR-MM;
/** Routine description.
* @author Name
* @version 1.0.0
* Routine detailed description.
*/
import java.util.*;
import java.io.*;
import java.lang.*;
public class ClassName {
// Variables definition
public static void main(String[] args) {
// Variables definition
// Pole - Array
String[] functionList = {"HB", "LB", "DI", "PO", "DRL", "FOG", "CL", "DRL-PO"};
int counter = 0;
// End of Variables definition
// ToDo application code here
if ((args != null) && (args.length > 0)) {}
// or
if ((args == null) || (args.length == 0)) {}
// as You need
System.out.println("Text to print.");
Scanner in = new Scanner(System.in);
int userValue = in.nextInt();
int year = in.nextInt();
System.out.println("Enter a string: ");
text1 = in.nextLine();
for (int i = 0; i < name.length; i++, counter++) {
System.out.printf("%02d", i);
}
System.out.println("Text to print.");
} // End of the main method
} // End of the public class
[Zpět]
[Java]