1.Which of the following statements is false about objects?
2.Which methods can access to private attributes of a class?a.An instance of a class is an object
b.Objects can access both static and instance data
c.Object is the super class of all other classes
d.Objects do not permit encapsulation
3.What is an aggregate object?a.Only Static methods of the same class
b.Only instances of the same class
c.Only methods those defined in the same class
d.Only classes available in the same package.
4.Assume that File is an abstract class and has toFile() method. ImageFile and BinaryFile are concrete classes of the abstract class File. Also, assume that the method toFile() is implemented in both Binary File and Image File. A File references an ImageFile object in memory and the toFile method is called, which implementation method will be called?a.An object with only primitive attributes
b.An instance of a class which has only static methods
c.An instance which has other objects
d.None of the above
5.A class can have many methods with the same name as long as the number of parameters or type of parameters is different. This OOP concept is known asa.Binary File
b.Image File
c.Both File and Binary Files
d.None of the above
6.Which of the following is considered as a blue print that defines the variables and methods common to all of its objects of a specific kind?a.Method
b.Invocating
c.Method
d.Overriding
e.Method Labeling
f.Method
g.Overloading
7.What are the two parts of a value of type double?a.Object
b.Class
c.Method
d.Real data
e.types
8.After the following code fragment, what is the value in fname?a.Significant Digits,
b.Exponent
c.Length, Denominator
d.Mode, Numerator
Code:String str; int fname; str = "Foolish boy."; fname = str.indexOf("fool");9.What is the value of ‘number’ after the following code fragment execution?a.2
b.-1
c.4
Code:int number = 0; int number2 = 12 while (number < number2) {number = number + 1; }10.Given the following code snippet;a.5
b.12
c.21
d.13
What is the value of salaries [3]?Code:int salaries[]; int index = 0; salaries = new int salaries[4]; while (index < 4) { salaries[index] = 10000; index++; }
a.4000
b.5000
c.1500
d.1000
12.Which of the following is not a return type?
13.If result = 2 + 3 * 5, what is the value and type of ‘result’ variable?a.boolean
b.void
c.public
d.Button
14.What is the data type for the number 9.6352?a.17,byte
b.25, byte
c.17, int
d.25, int
15.Assume that the value 3929.92 is of type ‘float’. How to assign this value after declaring the variable ‘interest’ of type float?a.float
b.double
c.Float
d.Double
a.interest = 3929.92
b.interest = (Float)3929.92
c.interest = 3929.92(float)
d.interest = 3929.92f
This page welcomes all s/w student or who want to be a part of Corporate lyf. Here is the platform where you can get relevant information, all regarding one of it . Look Index-Blog Review for quicker reference.
Sunday, 13 November 2011
TCS ILP PAT TEST on Java
Subscribe to:
Post Comments (Atom)
it would be better if u have posted the answers...
ReplyDeleteYah Sai Shortly they'll be updated !!
ReplyDeleteIRA test for itis will be only from aspire ah?
ReplyDeleteIRA test for itis will be only from aspire ah?
ReplyDelete