Coding Craze @[email protected]
15K subscribers - no pronouns :c
Win and to lose depends on you, If you agree, you lose and I
in the future - u will be able to do some more stuff here,,,!! like pat catgirl- i mean um yeah... for now u can only see others's posts :c
What is the output of the following Java code?
public class Solution {
public static void main(String args[]) {
int x = 7--2;
System.out.println(x);
}
}
3 - 0
What is the output of the following Java code, if input is : abc def 10
Scanner s = new Scanner(System.in);
String str = s.next();
int a = s.nextInt();
System.out.print(str + " " + a);
3 - 1
What will be the output of the following code?
public static void main(String args[])
{
int var1 = 5;
int var2 = 6;
if ((var2 = 1) == var1)
System.out.print(var2);
else
System.out.print(var2 + 1);
}
3 - 5
How many types of decrement operators in java?
Comment Your Answer.
#javaquiz βͺ@CodingCrazeIndiaβ¬
1 - 0
What is the output of the following Java code?
public class Solution {
public static void main(String args[]) {
int x = 7--2;
System.out.println(x);
}
}
3 - 2
What is the output of the following Java code and why?
final class Parent {
public void show() {
System.out.println("Inside parent class");
}
}
class Child extends Parent {
public void show() {
System.out.println("Inside child class");
}
}
public class Main {
public static void main(String args[]) {
Parent p = new Child();
p.show();
}
}
3 - 2
What is the output of the following Java code?
public class Test {
int x = 10;
public static void main(String args[]) {
Test t = new Test();
System.out.println(t.x);
}
static {
int x = 20;
System.out.print(x + " ");
}
}
4 - 0
Win and to lose depends on you, If you agree, you lose and If you are determined then you win.π
π
ππ₯ππ
π
ππ
πBE A WINNER π NOT LOOSER.πππ