Java Reference
In-Depth Information
17. Rerun the HelloWorld application. The output should look like this:
Hello World!
Some Text
Some Text
SOME TEXT -> FRENCH TEXT
Some Text for #2
SOME TEXT FOR #2 -> FRENCH TEXT
Some Text for #3
this.msgSize = 48, super.msgSize = 16
MsgSize for PrintfileErrorMsg = 48
18. Let's create an example of an interface definition and a supporting class
and have PrintfileErrorMsg use them. Create a new java source file in the
C:\java4cobol directory named WriteLineInterface.java. Insert these lines
of text into the class file definition:
//
// WriteLineInterface
//
//
public interface WriteLineInterface {
// Describe an abstract method (and its signature) that an implementing
// class might need.
public void printLine ();
}
19. Compile this class in the DOS command window:
javac WriteLineInterface.java
20. Create a new java source file in the C:\java4cobol directory named Write-
Line.java. Insert these lines of text into the class file definition:
//
//
// WriteLine
//
//
public class WriteLine {
Search WWH ::




Custom Search