What function in Java replaces the destructor function?
What HTML tag is used for Java applets to communicate with a web page?
How can a file be uploaded to a web server?
class test{
public static void main (String[] args) {
int x=1,y=16;
x=x>>2;
y=y>>x;
System.out.println(~x);
}
}
Which method of the StringBuffer class is used to concatenate a string representation to the end of the invoking StringBuffer object?
class test {
public static void main (String[] args) {
System.out.println('a'+0.89);
}
}
Predict the output of the following Java code:
class Abekus {
public static void main(String[] args)
{
do {
System.out.print(1);
do {
System.out.print(2);
do{ System.out.print(3);
do{ System.out.print(4);} while(false);
} while(false);
} while (false);
} while (false);
}
}
Predict the output of the following Java code.
class First {
void display() {
System.out.println("Inside : First."); } }
class Second extends First {
void display() {
System.out.println("Inside : Second."); } }
class Abekusmain {
public static void main(String[] args) {
First obj1 = new First();
Second obj2 = new Second();
First ref;
ref = obj1;
ref.display();
ref = obj2;
ref.display(); }
}
public void foo( boolean a, boolean b)
{
if( a )
{
System.out.println("A"); /* Line 5 */
}
else if(a && b) /* Line 7 */
{
System.out.println( "A && B");
}
else /* Line 11 */
{
if ( !b )
{
System.out.println( "notB") ;
}
else
{
System.out.println( "ELSE" ) ;
}
}
}