KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > InputMultipleVariableDeclarations


1 public class InputMultipleVariableDeclarations
2 {
3     int i, j;
4     int i1; int j1;
5
6     void method1() {
7         String JavaDoc str, str1;
8         java.lang.Object JavaDoc obj; Object JavaDoc obj1;
9     }
10     // second definition is wrapped
11
// line of VARIABLE_DEF is not the same as first line of the definition
12
java.lang.String JavaDoc string; java.lang.String JavaDoc
13         strings[];
14     //both definitions is wrapped
15
java.lang.
16
JavaDoc        String string1; java.lang.String JavaDoc
17             strings1[];
18
19     void method2() {
20         for (int i=0, j=0; i < 10; i++, j--) {
21         }
22     }
23 }
24
Popular Tags