A ____________ is a exit control loop in Java.
1.Do while
2.while
3.for
4.Switch
access mode of method polygon is _______________
1.new
2.public
3.private
for loop constraints are ____________
1.i=0; i<=n; i++
2.i=0; i<n; i++
3.i=1; i<n; i++
if (a==b) { System.out.printin(a+b); } else { System.out.println (a-b); } when a-7 and b=5
1.12,35
2.35
3. 2
Inialization of the word piglatin _____________
1.word="";
2.piglatin="";
3.piglatinWord="";
Name of the Class in above program is:
1.palin
2.palindrome
3.class
switch (x) { case'a':System.out.printin("Discipline"); case 'b:System.out.printin ("Dedication"); break; case 'c':System.out.println("Commitment") default: System.out.println("Success"); } when x='C'
1.Discipline
2.Dedication
3.Success
The statement to insert some data as input in Java is.
1.System.scaner(0)2
2.new
3.Scanner
The wrapper class to which boolean type belongs
1.boolen
2.boot
3.Boolean
The_____________ is called the instance of the class
1.Sub Class
2.Attributes
3.Object
4.None of these
What is the return type of Ispalindrome() function is
1.char
2.string
3.boolean
!(20<3&&4>6)
1.True
2.False
A _____________ is used to give single line comment in Java.
1.//*Comment
2./*Comment*1
3.11 Comment
4.*1 Comment *1
A _______________ is the data or a sequence of characters used in a program to represent a contant that never changes its value during the execution of program.
1.Class
2.literal
3.array
4.String
Access modifier of class palin is
1.public
2.private
3.protected
Beginning of string is denoted by
1. int i=0;
2.double i=0;
3.char i=0;
Boolean is a non- primitive data type
1.True
2.False
Choose the odd one:
1.&
2.&&
3.>>
4.<<
Choose the odd one:
1.>=
2.==
3.&
4.<=
Choose the odd one:
1.Switch
2.If
3.f-else
4.for
Choose the odd one:
1.byte
2.boolean
3.char
4.Array
Choose the odd one:
1.abstraction
2.inheritance
3.portable
4.encapsulation
Condition of while loop in above program is
1.i == j
2.i<J
3.i>=j
do loop is doubly bounded iterative statement.
1.True
2.False
Example of operator overloading is
1.&
2.**
3.++
Invoking a function without any parameters of a class is termed as
1.Call by value
2.call by reference
3.call as default
Keyword to use scanner class is ____________
1.old
2.new
3.Void
n-10000; while (n>10) n=n/10; Computer Applicatio System.out.println(n); How many time the loop is executed and what is the output?
1.Loop is executed 4 times and the output is 10
2. Loop is executed 3 times and the output is 100
3.Loop is executed 1 times and the output is 10.
Name of the class is ______________
1.Kboatpolygon
2.polygon
3.ob
Name the type of error in the statement given below int r-100/r
1.Syntax
2.Runtime
3.Logical
4.Warning
Operator overloading is the feature
1.Inheritance
2.Encapsulation
3.default
4.Polymorphism
Overloading types are?
1.Function overloading
2.Operator overloading
3.All of above
Scope of local variable is with in a class.
1.True
2.False
Statement to get length of string used above
1. strlen();
2.l=len();
3.str.lenth();
String x = (a<=30)? "poor": "fail"; when a = 30
1.poor
2.fail
3.poor and fail
The code which can execute on any machine and is independent of architecture is
1.Source code
2.Object Code
3.Byte code
The comparison operator(==)is left associative.
1.True
2.False
The method with the same name as of the class and which does not have a return data type is called as
1.Constructor
2.Function
3.Method
The number of bytes occupied by int data type is ____________byte/s
1.4
2. 8
3.2
4.None of these
The package used is ______________
1. java.util.*
2.java.sys.*
3.java.str.*
The parameters passed to object in main Program are ___________
1.5,2
2.2
3.2,5
The______ flag is initialized as __________.
1.flag=0;
2.flag!=0;
3.flag==0
To input the string object ____________ used.
1.ob.next()
2.ob.nextLine()
3.ob.nextln()
What is operator overloading?
1.A bloc of code similar to method with same name as its class.
2.Define the multi role of some operator
3.A bloc of code to find the class
What is the final value stored in variable x? int a-7.76; double x-Math.abs(Math.floor(a));
1. 8.0
2.7.0
3.8
4. 7
What is the Name of the class used in above program.
1.Piglatin
2.LatinWord
3.PiglatinWord
Which of the following is not valid KEYWORD? (i) for (ii) far (iii) Break (iv) since
1.(i)
2.(ii)
3. (iii)
4.(iv)
Which of the following reserved keyword in Java?
1.object
2.stricfp
3.main
4.system
Which one is not correct relational operator? (i) == (ii) = (iii) != (iv) <>
1.(i)
2.(ii)
3.(iii)
4.(iv)
x=x++ + ++ x; [x = 5]
1.9
2.10
3.11
4.12