The Java program use _______________ to find and fix bugs.
1.JDK
2.JRE
3.JVM
4.None of these
public void (d) ____________ System.out.println(admno); System.out.println(sname); System.out.println(eng); System.out.println(math); System.out.println(science); System.out.println(total); public void takedata(int a, String n, int e, int m, ints) admno= a; sname=n; eng e math= m; science= s; total= gettotal();
1.getdata
2.showdata
3.gettotal
String grade- (mark>-90)? "A" (mark 80)?/B:C
1.A
2.B
3.C
string is a non - primitive data type
1.True
2.False
y=(++y* (y++ +5)); - [y=10]
1.176
2.150
3.166
4.156
!(2<3&&40>60 )
1.True
2.False
A collection of related classes and interfaces having common functionality.
1.Literals
2.Package
3.Object
Choose the odd one
1.return
2.break
3.continue
4.System.exit(0)
Choose the odd one
1.byte
2.int
3.char
4.String
Choose the odd one
1.for
2.while
3.do
4.far
Choose the odd one
1.>=
2.==
3.&&
4.<=
Choose the odd one
1.&
2.<<
3.>>
4.==
class (a) _____________ .
1.stu
2.student
3.Student
class (a)_____________ { int product code, pack size, product price String flavour, pack_type;
1.Fruitjuice
2.input
3.discount
class test { long factorial(int n) } long f = (a)_______________;
1.1.0
2.0.0
3.1
Class variable that is available to the entire class.
1.local variable
2.class variable
3.instance variable
Defining two or more methods in the same class with same name.
1.Constructor over loading
2.Function overloading
3.Static function
f = (c)_____________*i; { return f }
1.i
2.f
3.n
float (C)_____________= eng +math +science; return t;
1.t
2.total
3.T
for (int i = 1 (b)_______________; i++)
1.i=n
2.i>=n
3.i<=n
for (int m-5; m-20; m+-5) if(m%3-0) break; 396 61 Sample Question Papers (ICSE-Class X) else if (m%5-0) System.out.print(m) continue;
1.Loop is executed 3 times and output is 5, 10, 15
2.Loop is executed 2 times and output is 5, 10
3.Loop is executed 4 times and output is 5, 10, 15, 20
for (int m-5; m-20; m+-5) if(m%3-0) break; 396 61 Sample Question Papers (ICSE-Class X) else if (m%5-0) System.out.print(m) continue;
1.Loop is executed 3 times and output is 5, 10, 15
2.Loop is executed 2 times and output is 5, 10
3.Loop is executed 4 times and output is 5, 10, 15, 20
For loop is doubly bounded iterative statement.
1.True
2.False
Functions can't return objects.
1.True
2.False
if (a> b) System.out.println(a+b); else System.out.println (a"b); when a =5 and b =7
1.12, 35
2.35
3.35, 12
In java the types of constructors are
1.parameterized
2.non parameterized
3.default
4.All of above
Java language was initially caled Oak.
1.True
2.False
Memory can be initialized for storing objects by ?
1.Constructors
2.Destructors
3.All of above
Name of method for constructor is similar to
1.package
2.class
3.object
Name the type of error in the statement given below: int r-100/0;
1.Syntax
2.Runtime
3.Logical
4.Warning
product price =(d) _________ -10;
1.Discount
2.product price
3.pack size
public (b)________________ product_code- 0 pack size -0; product _price= 0; flavour="" pack type"", void input() throws IOFxception BufferedReaderbr- new BufferedReaderinew nputstream Reader(System.in) System.out println(" Enter Product IDetails) product code Integer parselnt(hrreadlme flavor= br.readLine0: pack type-br.readLine() pack size- Integer.parselnt(br.readLine(); product price Integer.parselnt(br.readLine) void ()
1.Fruit
2.Fruitjuce
3.fruitjuce
public class stud public static void main(String [] args) new student() student (e)____________
1.Std
2.std 1
3.student
std1.(f) (101, "RAM", 30, 48, 40); std1.showdata();
1.takendata
2.showdata
3.getdata
switch (var) { case 'A: System.out.printin("good" case 'B:System.out.println ("better"); break; case 'C:System.out.println("best"); break; default: System.out.printin(°Poor ); } when var 'a'
1.Good
2.Better
3.Poor
System.out.printin("Factorial ="+(d)_________________);
1.f
2.i
3.fact
System.out.println(product_code +" "+flavour+" "+pack_type+ +(f) +"" +product price);
1.Packsize
2.pack_size
3.Pack_size
The function that modifies its parameters
1.Virutal function
2.Pure function
3.impure unction
The number of bytes occupied by double data type is ____________byte/s
1.4
2.8
3.2
4.None of these
The region within which a variable/piece of code is accessible.
1.Area of variable
2.Place of variable
3.Scope of variable
void (c)_____________
1.Discount
2.product_price
3.pack_size
void (e)_______________()
1.Display
2.discount
3.input
What is constructor?
1.A bloc of code similar to method with same name as its class.
2.A bloc of code to create object
3.A bloc of code to find the class
What is the final value stored in variable x ? double a-8.35, double b 14.74 double x= Math.abs(Math.max(a, b));
1.14.0
2.15.0
3.16.0
4.14.74
Which of the following are valid KEYWORD? (i) Try (ii) Throw (iii) extends (iv) catch
1.(i) & (iii)
2.(i) (ii) & (iii)
3.All of the above
4.None of the above
Which of the following keyword is not used to specify the accessible feature of the derived class?
1.private
2.public
3.new
4.protected
Which one is not correct relational operator? (i) == (ii) = (iii) != (iv) <>
1.(i), (iii)
2.(ii)
3.(iv),(ii)
4.(i) (ii) (iii)
__________access specifier gives the most accessibility.
1.Public
2.Private
3.Pestected
4.None of these
____________has same name as of class.
1.data
2.object
3.Sub class
4.Constructor
__________________is the collection of related classes and interfaces having common functionality.
1.literal
2.Polymorphism
3.Array
4.Polymorphism
{ private intadmno private String sname; private float eng, math, science, total; private float (b)_____________.
1.getdata
2.showdata
3.gettotal