mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-28 17:28:03 +00:00
add a minjava code what can be typed right now
This commit is contained in:
parent
b8f132d9da
commit
2b6a5277b5
51
src/main/resources/JavaTestfiles/ClassCanBeTyped.java
Normal file
51
src/main/resources/JavaTestfiles/ClassCanBeTyped.java
Normal file
@ -0,0 +1,51 @@
|
||||
public class ClassCanBeTyped {
|
||||
int x;
|
||||
int y;
|
||||
char z;
|
||||
|
||||
public ClassCanBeTyped() {
|
||||
this.x = 10;
|
||||
int i;
|
||||
for (i = 0; i < (x+1); i = i + 1) {
|
||||
int j;
|
||||
for (j = 0; j < this.x; j += 1) {
|
||||
this.x = this.x * this.x;
|
||||
break;
|
||||
}
|
||||
}
|
||||
do{
|
||||
this.y = this.y + 1;
|
||||
}while (this.y < 10);
|
||||
|
||||
if(this.x > 10) {
|
||||
this.x = 10;
|
||||
} else {
|
||||
this.x = 20;
|
||||
}
|
||||
int k = 0;
|
||||
for ( k = 0; k < 10; k = k+1) {
|
||||
if(k == 5) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public ClassCanBeTyped(int x, int y, char z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
|
||||
}
|
||||
public int getY() {
|
||||
return this.y;
|
||||
}
|
||||
public int getX() {
|
||||
return this.x;
|
||||
}
|
||||
|
||||
public char getZ() {
|
||||
return this.z;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user