Line | |
---|
1 | package testcode;
|
---|
2 |
|
---|
3 | /**
|
---|
4 | * Test for PrintStream. Uses several variants of print/println TODO also test
|
---|
5 | * the other functions: write, append, printf, format etc
|
---|
6 | */
|
---|
7 | public class PrintStreamExample {
|
---|
8 | /**
|
---|
9 | *
|
---|
10 | * @param args the arguments of the call.
|
---|
11 | */
|
---|
12 | static public void main(String[] args) {
|
---|
13 | System.out.print("H");
|
---|
14 | System.out.print('e');
|
---|
15 | System.out.print(1);
|
---|
16 | System.out.print(1.0);
|
---|
17 | System.out.print(true);
|
---|
18 | System.out.println();
|
---|
19 | System.out.println(new char[] { 'b', 'y', 'e' });
|
---|
20 | }
|
---|
21 |
|
---|
22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.