Showing posts with label Placement Papers. Show all posts
Showing posts with label Placement Papers. Show all posts

Sunday, 29 January 2012

Core Java Interview Questions


1) Explain about Core Java ?
 Java is increasingly used for middleware applications to communicate between Server and clients. Java has features such as multithreading, portability and networking capabilities. Changes in the java library made java as a favorite programming language for developers it added functionality to their scripts.

2) State some advantages of Java?
 Platform independence is the key feature of Java during runtime. Syntax of java is similar to the popular object oriented languages such as C and C++. Java program can eliminate most of the bugs present in the program. Manual memory allocation and de allocation feature present in Java is automated.

3) State the main difference between C++ and Java?
 The main difference between C++ and Java lies in multiple inheritances. Java Meta class model has a better solution than C++. Persistent objects can be implemented by features such as object serialization and reflection mechanism. GUI can be implemented easily.

4) Explain about the security aspect of Java?
 Java has some bugs in its applets. Java team stated that they have zero tolerance over security features and subsequent editions of Java are improving Bug free environment. Some of the features are overriding the runtime stack, disallowing the corruption of memory outside its own process, reading or writing on local files where it is actually forbidden to do these processes, etc.

5) Explain about the interpreter in Java?
 Machines should have Java interpreter for the Java byte code to get executed. Linking is a very easy process and this feature helps while developing applications. Java compiler which is available with software development kit is a bit slower in execution of scripts.

6) Explain about the performance aspects of Core Java?
 Performance of interpreted byte codes is enough but it can be improved much more than that. Byte codes are translated into machine language within no time, this speed of execution can be achieved during application compiling time. JIT compilers are also present which compile the byte codes into native code.

7) Explain about the dynamic behavior of core java?
 This language was designed to adapt the changing environment and behavior. New methods and instance variables can be added to the client side without any major changes happening at the client end. This function is very important for GUI builders, pluggable components, debuggers and object database.

8.)Explain about Java SDK?
 Java SDK is not so comfortable with people used to command line interpreter. IDEs include compilers, editors, debugging facilities, drag and drop techniques, etc. This compiler strives to generate hundreds of lines in code UI. This platform may become a universal platform.

9) What are the three best choices for development environment?
 The three best choices for development environment include.
 1) Java SDK and text editor can be a perfect choice.
 2) Java SDK and a text editor which is built within the SDK.
 3) Using IDE such as free Forte community edition.

10) Explain about Class in Java?
 In Java every thing exists within a class. It defines the behavior of the class and its characteristics. Java applications and applets are built in the class. Rules present for class name are generous and some of the basic rules are names should start with a letter after that letter they can have any combination of letters and digits. It can contain names to any length.

 11) Explain about data types?
 Variables declared should have a declared type. Out of the eight data types four data types are integer, two are floating type integers, one is character type out of which one is Boolean and the other Unicode. Core Java is known to be a strong typed language.

12) Explain about assignment statement?
 After declaring a variable, it should be initialized explicitly. Uninitialized variable can never be used. To a declared variable you must assign a variable name on the left, equal sign and a java expression should have a appropriate value to the right.

13) Give the difference between the println method and sqrt method?
 Println method operates on the object system.out and has the value which should be printed namely y. sqrt method is a static method. It does not operate on any object. It has the number stored in x for which the square toot should be found out.

14) Explain about strings in Java?
 Strings represent nothing but a string of characters. Java does not have any built in string type. It contains predefined class which can be called enough as a String. Instance of a string is called as a string. Much similar to many object oriented languages a + sign is used.

15) Explain the reason behind ending a program with a System.exit (0)?
 The reason behind ending a program with System.exit (0) involves technicalities. When main method exits the new thread automatically does not end. The appearance of this thread is because of dialog box functionality. System.exit ends all the methods.

16) Explain about inheritance hierarchies?
 An inheritance hierarchy has a collection of all classes which fall under the main class. Inheritance chain defines the path from where all the sub classes originated and their relation ship. Controller normally handles user input. Inheritance hierarchy is very important in software modeling.

17) Explain about the select method with an example?
 Select part is useful in selecting text or part of the text. Arguments specified for the select command are the same as applicable to substring. First index is usually represents the start of the index. End of line makers are counted as one character. 

HCL Placement Papers


1) The letters P, Q, R, S, T, U and V, not necessarily in that order represents seven
 consecutive integers from 22 to 33.
 • U is as much less than Q as R is greater than S.
 • V is greater than U.
 • Q is the middle term.
 • P is 3 greater than S.
 Can you find the sequence of letters from the lowest value to the highest value?

Answer
 The sequence of letters from the lowest value to the highest value is TUSQRPV.

2) Because cigars cannot be entirely smoked, a Bobo who collects cigar butts can make a cigar to smoke out of every 3 butts that he finds.Today, he has collected 27 cigar butts. How many cigars will he be able to smoke?
 Answer
 13

3) A boy found that he had a 48 inch strip of paper. He could cut an inch off every second.How long would it take for him to cut 48 pieces? He can not fold the strip and also, can not
 stack two or more strips and cut them together.
 Answer
 47 seconds.

In operating systems
 Which of the following actions trigger context switching ?

a) System call

b) divided by zero exceptions

c) all of the above                

Answer: System call

No of address lines required for 1 Mega Bytes of memory is

a) 20
 b) 10
 c) 12
    
 Answer: A                                    

In Open Systems Interconnect model, which of the following layers is responsible for terminal emulation?

a) Application layer
 b) Presentation layer
 c) Transport layer   

Anwer: A                                    
 What is the minimum value that can be stored in 8 bits using signed int datatype ?

a) -255
 b) -128
 c) -127   

Answer: B

Which is the smallest addressable unit of memory?

a) 1 bit
 b) 1 byte
 c) 1 word
                                           
 Answer: A

What is the size of the memory unit, WORD ?

a) CPU specific
 b) 1 byte
 c) 2 bytes                                                          
 Answer: A

How many bytes make one Octet ?

a) 2
 b) 1
 c) 8                                                                        
 Answer: B

Which layer of OSI is responsible for Modulation and Demodulation?

a) Physical Layer
 b) Data Link Layer
 c) Network Layer
                
 Answer: A

Which Layer establishes, manages and terminates connections between local and remote applications?

a) Physical Layer
 b) Session Layer
 c) Data Link Layer
                                        
 Answer: B

10 in 4 seconds, ? in 6 minutes

a) 800
 b) 900
 c) 650
                                        
 Answer: B

Mohan earned twice as much as Deep.Yogesh earned rs.3/- more than half as much as deep. If the amounts earned by Mohan,Deep,Yogesh are M,D,Y respectively, Which of the following is the correct ordering of these amounts?

a) M< D < Y
 b) M< Y < D
 c) D < M < Y
 d) It cann’t be determined from the information given
 e) D < Y < M

Answer: A

Given that A,B,C,D,E each represent one of the digits between 1 and 9 and that the following multiplication holds:
 A B C D E
 X 4
 ————–
 E D C B A
 ————–
 what digit does E represent ?

a) 4
 b) 6
 c) 7
 d) 8   
                                     
 Answer: 8

From the following statements determing the order of ranking
 M has double the amount as D
 Y has 3 rupess more than half the amount of D

a) 15
 b) Data insuffiecient

Answer: B

Placement Papers
 10^2(10^8+10^8) =
 ————–
 10^4
 a) 2(10)^4
 b) 10^8
 c) 2(10)^8
 d) 10^10
 e) 2(10)^6
 Answer: E
 At a special sale, 5 tickets can be purchased for the price of 3 tickets.
 If 5 tickets are purchased at the sale, the amount saved will be
 What percent of the original price of the 5 tickets?

a) 20%
 b) 33.3%
 c) 40%
 d) 60%
 e) 66.6%

Answer: C

An investor purchased a shares of stock at a certain price.
 If the stock increased in price Rs 0.25 per share and the total increase for the x shares was Rs 12.50, how many shares of stock had been purchased ?

a) 25
 b) 50
 c) 75
 d) 100
 e) 125

Answer: B

How many integers n greater than and less than 100 are there such that,if the digits of n are reversed, the resulting integer is n+9 ?

a) 5
 b) 6
 c) 7
 d) 8
 e) 9         

Answer: D

ICICI Placement Papers



1)If on an item a company gives 25% discount, they earn 25% profit. If they now give 10% discount then what is the profit percentage.
 (a) 40% (b) 55% (c)  35% (d) 30%
 (Ans. D) 

2)A certain number of men can finish a piece of work in 10 days. If however there were 10 men less it will take 10 days more for the work to be finished. How many men were there originally?
 (a) 110 men (b) 130 men (c) 100 men (d) none of these
 (Ans. A)

3)In simple interest what sum amounts of Rs.1120/- in 4 years and Rs.1200/- in 5 years ?
 (a) Rs. 500 (b) Rs. 600 (c) Rs. 800 (d) Rs. 900
 (Ans. C)

4)If a sum of money compound annually amounts of thrice itself in 3 years. In how many years will it become 9 times itself.
 (a) 6 (b) 8 (c) 10 (d) 12
 (Ans A)

5)Two trains move in the same direction at 50 kmph and 32 kmph respectively. A man in the slower train observes the 15 seconds elapse before the faster train completely passes by him. What is the length of faster train ?
 (a) 100m (b) 75m (c) 120m (d) 50m
 (Ans B)