//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
//In order to verify variable and constant...
//Costant are verify by UPPERCASE of all alphabat
class J
{
static final int CON = 10;
static final String DRIVER = "some driver";
public static void main(String args[])
{
System.out.println(CON);
System.out.println(DRIVER);
}
}
9. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
class K
{
public static void main(String args[])
{
System.out.println(Thread.MIN_PRIORITY); /*In java sun developer identify the constant*/
System.out.println(Thread.NORM_PRIORITY); /*But it is not compulsory to give all char in uppercase*/
System.out.println(Thread.MAX_PRIORITY);
}
}
10. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
class L
{
static final int MAX_REDUCTION = 10;
final static String COUNTRY = "INDIA";
public static void main(String args[])
{
System.out.println(MAX_REDUCTION);
System.out.println(COUNTRY);
}
}
11. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
//in every interface class Every feild get public static final by compiler...
interface M
{
public static final int REDUCTION = 10;
int j = 20;
String k = "hello";
}
12. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
// All are public static final
interface O
{
int I = 10;
static int J = 10;
public static int K = 10;
public final static int L = 10;
public static final int M = 10;
static public final int N = 10;
final public static int X = 10;
}
13. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
class P
{
final void test1()
{
}
void test2()
{
}
}
class Q extends P
{
void test1()
{
}
void test2()
{
}
}
14. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
abstract class R
{
abstract final void test(); //abstract method could'nt be final...
}
final interface X // its not right combination
{
}
15. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?