1. int w = (int)888.8;2. byte x = (byte)100L;3. long y = (byte)100;4. byte z = (byte)100L;
public class Test{ public static void printValue(int i, int j, int k){ System.out.println("int"); } public static void printValue(byte...b){ System.out.println("long"); } public static void main(String... args){ byte b = 9; printValue(b,b,b); }}
A. public class Circle implements Shape { private int radius; }B. public abstract class Circle extends Shape { private int radius; }C. public class Circle extends Shape { private int radius; public void draw(); }D. public abstract class Circle implements Shape { private int radius; public void draw(); }E. public class Circle extends Shape { private int radius; public void draw() { /* code here */ } }F. public abstract class Circle implements Shape { private int radius; public void draw() { /* code here */ } }
#include <stdio.h>int func (int a){ int b; return b;}int main(){ int c; func (c);}int d;
#include <stdio.h>int x = 0;int f(){ if (x == 0) return x + 1; else return x - 1;}int g(){ return x++;}int main(){ int i = (f() + g()) | g(); //bitwise or int j = g() | (f() + g()); //bitwise or}
#include <stdio.h>int x = 0;int f(){ if (x == 0) return x + 1; else return x - 1;}int g(){ return x++;}int main(){ int i = (f() + g()) || g(); int j = g() || (f() + g());}
#include <stdio.h> //Program 1int main(){ int a; int b; int c;}#include <stdio.h> //Program 2int main(){ int a; { int b; } { int c; }}
class A{ private int i; protected int j;}class B extends A{ private int k; protected int m;}