Forwarded from Advanced JAVA
HTML, CSS, Ajax, Bootstrap, Javascript, jQuery Notes.zip
13 MB
public class Program
{
public static void main(String[] args) { System.out.println(fun()); } static int fun(){ return 20; } }
{
public static void main(String[] args) { System.out.println(fun()); } static int fun(){ return 20; } }
Anonymous Quiz
71%
20
10%
10
3%
30
16%
Compile time error
public class Program
{
static int var=5; public static void main(String[] args) { System.out.print(var--+" "); if(var) main(args); } }
{
static int var=5; public static void main(String[] args) { System.out.print(var--+" "); if(var) main(args); } }
Anonymous Quiz
52%
5 4 3 2 1
16%
1 2 3 4 5
20%
Runtime Error
12%
Compile time error
public class Program
{
static int var=5; public static void main(String[] args) { System.out.println(var-- +); if(var!=0) main(args); } }
{
static int var=5; public static void main(String[] args) { System.out.println(var-- +); if(var!=0) main(args); } }
Anonymous Quiz
42%
5 4 3 2 1
8%
1 2 3 4 5
38%
Runtime Error
13%
Compile Time Error
which of the following statement considered to be a disadvantage of using a cursor?
Anonymous Quiz
25%
Fetching a row from the cursor may result in a network round trip
38%
Cursor doesn't allow to update the record
38%
Cursor can only run from a trigger
How will you return number of records in "orders" table?
Anonymous Quiz
23%
SELECT COUNT() FROM ORDERS
9%
SELECT SUM(*) FROM ORDERS
50%
SELECT COUNT(*) FROM ORDERS
18%
SELECT SIZE() FROM ORDERS
public class TestComp {
public static void main(String args[]) { int x = 1; System.out.println("The value of x is " + (~x >> x) ); } }
public static void main(String args[]) { int x = 1; System.out.println("The value of x is " + (~x >> x) ); } }
Anonymous Quiz
20%
1
20%
2
55%
-1
5%
-2