An array is assed by____________ to a user defined function.
1.Reference
2.Value
3.Address
4.Index
(2<3&cde40>6)
1.True
2.False
(c)______________;
1.k<=n;
2.k<=n;
3.k+n;
(d)_______________) {System.out.printin(k); }
1.k+=2
2.k+=5
3.k++
A loop statement within another looping statement is termed as
1.Nested loop
2.Nested
3.Nested if
An interface with no fields or method Is known as___________.
1.Runnable interface
2.Market interface
3.Abstract interface
4.Charsequence interface
An OOPs program can contain______________ no. of classes.
1.only 999
2.Only 100
3.only 1
4.Any number
Billingtnew BillingO t.input(); (f)_______________________ tprint0 ()
1.t.input()
2.t.calculate()
3.t.print()
Choose the odd one
1.Inheritance
2.Data abstraction
3.Portable
4.Data hiding
Choose the odd one
1.>=
2.==
3.&&
4.<=
Choose the odd one
1.code reusability
2.Efficient code
3.Duplicate/redundant data
4.Modularity
Choose the odd one
1.Inheritance
2.Reusability
3.Base class and sub class
4.Private
Choose the odd one
1.int var
2.int VAR
3.int Lvar
4.tnt vart
class (a)____________
1.POLIMORPH
2.polimarph
3.class
class (a)_____________ int noc; double bill; String n ;
1.Billing
2.class
3.object
Do loop executes at least once.
1.True
2.False
else bill=(e)______________. void print0 System.out.printin("Name = "+n) System.out.println("Amount to be paid="+bill); void main ()
1.bill=0(n-100)*2.50
2.bill=0(n-100)*3.50
3.bill=n*2.50
Give the output of the following a+= a++ + ++a+-- a+a-- ; [ a=7 ]
1.37
2.40
3.39
4.38
if ( (f)____________________) return true; else return false;
1.if(n%m == 0)
2.if(m%n == 0)
3.if(m/n == 0) [1]
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
import java.io." public class (a)________________
1.mul
2.multiply
3.multi
n-100 while (n> 10) n-T/10; System.out.printin(n); How many time the loop is executed and what is the output?
1.Loop is executed 2 times and the output is 100
2.Loop is executed 3 times and the output is 10
3.Loop is executed 1 times and the output is 10.
Name given for sequence breaking of flow either forward or backward is
1.Looping
2.Decision Control
3.Jump statement
Name the type of error in the statement given below: int a; b; c;
1.Syntax
2.Runtime
3.Logical
4.Warning
Operators with higher precedence are evaluated before operators with relatively lower precedence. Arrange the operators given below in order of higher precedence to lower precedence. (i) && (ii) % (iii) >= (iv) ++
1.(iv)(i)(iii)(ii)
2.(iv)(iii)(ii)(ii)
3.(iv)(ii)(iii)(i)
4.(i)(ii)(iii)(iv)
Package containing the Random class?
1.java.util.package 2
2.java.langpackage
3.java.awt package
4.java.io.package
public static void main(String args|) throws IOException int n, t; BufferedReader br new BufferedReader(new InputStreamReader(System.in)); String s br.readLine0: n Integer.parselnt(s): for(int k=1; (b)______________k++)
1.k<10
2.k>0
3.k<=10
Scanner ob = (b)_________________Scanner(System.in); void input() {
1.old
2.new
3.void
Scope of local variable is with in a class.
1.True
2.False
Software package providing Java class libraries.
1.JDK
2.JRE
3.JVM
4.None of these
State True Or False (a) string is a non primitive data type
1.True
2.False
System.out.println("Enter Number of units" noc =(c) ________________ System.out.println("Enter name ") n=ob.next();
1.ob.nextDouble()
2.ob.nextLine()
3.ob.nextInt()
System.out.println(n+"(d)______________" +k+ "+" + t);
1.*
2.+
3.=
t=(c)_____________*n;
1.k
2.t
3.n
The comparison operator( == ) is left associative
1.True
2.False
The keyword that represents the corent object is:
1.Now
2.This
3.Corrent
4.None
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
4.Class
The number of bytes occupied by int data type is___________byte/s
1.4
2.8
3.2
4.None of these
The _______________ allows to combine the methods with its data where they are defined to work.
1.Inheritance
2.Polymorphism
3.Encapsulation
4.None of the above
The ________________ is called the factory of the object.
1.Class
2.Attributes
3.State
4.None of these
void calculate() { if ( (d)__________________bill =0;
1.noc< = 100
2.noc=0
3.noc>100
void print (int n) int k; (b)___________________
1.k=1
2.k=n
3.k=0
What are the looping statements in java ?
1.if and switch
2.for, do and while
3.ternary and logical
What is the final value stored in variable x ? double x = Math.pow ("345". index of (5), 3);
1.8.0
2.7.0
3.16
4.4
Where can a function in Java be written?
1. Inside a class
2.Outside a class
3.Inside main () function
4.None
Which of the following are valid KEYWORD? (i) class (ii) object (iii) extends (iv) instance
1.(i) & (iii)
2.(i) & (ii)
3.all of these
4.None of these
Which of the following does not executive once ?
1.for (k = 1; k<=10;k++)
2.for (k = 1; k==10;k++)
3.for (k = 1; k<10;k++)
{ Case A: System.out.print in ("Honest") Case B:System.out.print In ("Hardwork") Case C:System.out.print In ("Success") default :System.outprint in ("Failure") when x='d'
1.Honest
2.Hardwork
3.Failure
{ print ( int m, (e)______________) }
1.int n
2.double n
3.char n