The '&' operator can return -
Which of these integer constants are defined in the ActionEvent class?
Which event is generated when a component is added to or removed from a container?
What will str contain after successfully running following lines of code?
StringBuffer str = new StringBuffer("Hello");
str.deleteCharAt(0 , 2);
What does the following code output?
Which will legally declare, construct, and initialize an array?
What does the Liskov Substitution Principle specify?
What will be the output of the program?
class Test
{
public static void main(String [] args)
{
int x=20;
String sup = (x < 15) ? "small" : (x < 22)? "tiny" : "huge";
System.out.println(sup);
}
}
What will be the output of the following Java program?
import java.lang.System;
class Output
{
public static void main(String args[])
{
long start, end;
start = System.currentTimeMillis();
for (int i = 0; i < 10000000; i++);
end = System.currentTimeMillis();
System.out.print(end - start);
}
}
What will be the output of the following Java program?
import java.io.*;
public class filesinputoutput
{
public static void main(String[] args)
{
String obj = "abc";
byte b[] = obj.getBytes();
ByteArrayInputStream obj1 = new ByteArrayInputStream(b);
for (int i = 0; i < 2; ++i)
{
int c;
while ((c = obj1.read()) != -1)
{
if(i == 0)
{
System.out.print((char)c);
}
}
}
}
}