Java
Java
Ex apel printBradut(3) :
*
***
*****
int x = 0;
int y = 0;
while (true) {
if (++x <= 10 || ++y <= 10) {
System.out.println("*”);
} else {
break;
}
}
}
}
3. Ce se va afisa ?
try {
str.charAt(1);
}
4. Ce se va afisa ?
class Parent
{
int value = 1000;
Parent() {
System.out.println("Parent Constructor");
}
void draw() {
System.out.println("draw parinte val="+value);
}
}
class DerivationInterview {
public static void main(String[] args) {
Child obj=new Child();
System.out.println("Reference of Child Type :" + obj.value);
int a = 3;
int b = 5;
6. Ce se va afisa ?