-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRB24.java
More file actions
61 lines (61 loc) · 936 Bytes
/
Copy pathRB24.java
File metadata and controls
61 lines (61 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import java.lang.Math;
class RB24
{
String s;
StringBuffer sb;
int a[][] = new int[4][4];
RB24()
{
double d;
for(int i = 0;i < 4;i++)
{
for(int j = 0;j < 4;j++)
{
d = Math.random();
d *= 100;
a[i][j] = (int) d;
}
}
}
public void test()
{
System.out.println("test run");
}
public String t()
{
return("test");
}
public String toString()
{
sb = new StringBuffer(84);
s = "";
int x;
for(int i = 0;i < 4;i++)
{
for(int j = 0;j < 4;j++)
{
x = a[i][j];
sb.append(x).append(" ");
}
sb.append('\n');
}
s = sb.toString();
return(s);
}
}
class RB24a
{
public static void main(String args[])
{
RB24 r1 = new RB24();
System.out.print(r1);
r1.test();
System.out.print(r1);
r1.test();
RB24 r2 = new RB24();
r2.test();
System.out.print(r2);
r2.test();
System.out.println(r2.t());
}
}