What will be the output
class comma-output
{
public static void main(String args[])
{
int sum=0;
for(int i=0,j=0,i<5&&j<5;++i,j=i+1)
sum+=i;
System.out.println(sum);
}
}
What is the valid data type for variable "a" to print "Hello world"?
Switch(a)
{
System.out.println("Hello World")
}
From where does break statement causes an exit?
When does method overloading is determind
Memory Address of allocated Memory of object.
Which of these operators is used to allocated memory for an object ?
What will be the output
class box
{
int width;
int height;
int length;
}
class mainclass
{
public static void main (String args[])
box obj=new box();
System.out.println(obj);
}
Which of the following is type of polymorphism in java?
Which coding type is used for data type character in java?
Default value of Boolean type variable
Range of math.random() method is
What is the order of variables in Enum?
Which one of these is an assignment operator
Which one of these is not an object oriented language
...........is act of representing the essential features without knowing the background details.
In object oriented programming the stress is given on-
Which one is not an escape sequence in Java.
Which declaration for character data is correct?
Which one is Non-Primitive data type?
The range of Char data type -
One of the Java keyword is -
For which of the given class sub-class can not be created-
All Syntax errors can be termed as
Which type of language is java...
Object can be called what of a class...?
Life Cycle of thread is controlled by
Which of these is used to perform all input and output operations in java ?
What does AWT stands for?
What will this code print ? int arr[]=new int[5];System.out.println(arr);
Whis of these is necessary to specify at time of array initialization?
Which of these keyword is not a part of exception handling ?
Which of these operators can be used to concatination two or more string objects?
Method used to obtain length to string object
Who invented java language ?
When you array to a method the method services.........?
System class is defined in ..?
In order to run JSP.....is required.
Why we use array as a parameter of main method
Suspend thread can be revuved by using-
Converting a primitive type data into its corresponding warapper class object instance is called-
Which method executes only oncs?
Which of the following is not mandatory in a variable declaration-
What will be the output of following code?
byte x=64, y;
y=(byte)(x<<2);
System.out.println(y);
The information Written in java after // is ignored by ?
If m and n are int type variables what will be the result of the expression-
Which of the following do not represent legal flow control statements ?
What is the default return type of main()
A java program if first .................. and .............
Consider the statement "x=(a>b)?a:b", then the value of x is 19 if a=19 and b=12
Which of the following methods can be used to remove a component from the display?
Which of the following will produce a value of 10 if x=9.7?
To prevent any method from overriding ,we declare the method as,
What is the type and value of the following expression
Which of the following variable declaration would NoT compile in java program?
A constructor
- Must have the same name as the class it is declared within.
- is used to initialize istance variable.
- May be declared private
In java , a try block should immediately be followed by one or more .....blocks.
Which of the following does't have a super class.
Which will contain the body of the thread?
Which type of variable can not be accessed outside the class
How many times does this code segment execute
int x=1,y=10,z=1;
do{y--;x++;y-=2;y=z;z++}
while (y>1&&z<10);
A method name my Method() that needs 2 integer arguments is declared as?
Match the following :
a.java 1>is a tool for debugging java program
b.java h 2>is a tool for creating C-like header file
c.java p 3> runs java byte code
d.jdb 4>prints java code representation
The .....and the.... classes are abstract classes supporting reading and writing of the byte streams.
Which method belong to string class?
the class at the top of exception class hierarchy is-
Why this keyword is used in java?
Which of the following are wrapper classes?
Given the code
String s= new String ("abc");
Which of the following calls are valid
Which of the following can be used to copy data from one array to another?
Break the statement is ude to
-
get out of method
end of a programget out of a loopget out of the system
1. AWT is an extended version of swing.
2. Paint() of Applet class cannot be overriden.
or
The Paint() Method of Applet clas can not be overriden-
If System.in.read() is being used , the program must specify the .....clause?
If a variable is declared final, it must include.........value.
Java support RMI. What does this RMI stand for?
Consider the following code .
if(number>=0)
if(number>0)
System.out.println("Number is positive");
else
System.out.println("number is negative");
What will be the output if number is equal to 0.
The life cycle of an applet is described by .... methods
int a[],b;int []c,d; What is type of variables 'b' and 'd' in the following java sni ppet?
What will be the output of given java code.
class increment
{
public static void main(String args[])
{ int g=3;
System.out.print(++g*8);
}}
Which of these have highest precedence?
Which of the following is used to compile, debug and execute java program?
How many copies of static and class variable are created when 10 objects are created of class?
Which of the method of object class can clone an object?
Which of these is correct way of inheriting class A by class B
What will S2 contain after following lines java code
String s1="one";
String s2= s1.concat("Two");
output of the following java code
class output
{
public static void main(String args[])
{
String s1="Hello";
String s2= s1.replace('l','w');
System.out.println(s2);
}}
Which of these classes is not included in java.lang?
Which of the following method of process class can terminate a process?
Which of these values are returend under the case of normal termination of a program.
What will be the output
import java.lang.System;
class output{
public static void main(String args[])
{
System.exit(5);}}
Which of these is not a method of Thread class?
What will be the output
public class tester
{
public static void main(String args[])
{
int i=0;
i=i++ +i;
System.out.println("I="+i);}
}
What is the error in the given java code?
An Array elements are always stored in...memory locations-
Which operator is used to invert all the digits in a binary representation of a number?