Placement Papers for All Companies

3i infotech
Abacus Infotech
Abatix
Abaxis
ABB
ACC Limited
Accel Frontline
Accenture
Aditi Technologies
Adobe System
ADP
Agilysys
AgreeYa
AIG
AirNet
Alanco Technologies
Alle Technologies
Allfon
Alter Systems
Amazon
AMDL
Amdocs
AMI
Amiti Software Technologies
ANZ
Apple
Applied Materials
Apps Associates
Aricent
ASDC
Ashok Leyland Ltd
Asian Paints
Aspire System
AT & T
Atlas Copco
Atos Origin
AXA Technology Services
Axes Technology
Bain
Bajaj
Bayer
Bharti Airtel Ltd
Bhawan Cybertek
Birlasoft
Blue Star Infotech
BMC
BOB
Brakes India
C-DOT
CA Technologies
Cadence
Calsoft
Canarys
Capgemini
Caterpillar
Celstream
CGI Group
Changepond Technologies
Cimtrix Systems
Cisco system
Citicorp Overseas Software Ltd
ClinTech
CMC Limited
CMS
Cognizant
Compaq
Consagous Technologies
Convergys
CORDYS
CRISIL
Crompton Greaves
CSC
CSFB
CtrlS Datacenters Ltd
Cummins
Cyient
Daffodil
Daimler
Dell
Deloitte
Delphi-TVS
Dharma Systems
Directi
DSRC
Eicher
ELGI
ELICO
EMC Corporation
Emphasis
Ericsson
Ernst & Young
ESKO
Essar
Facebook
Fanuc Corporation
Fidelity
Flextronics
Flipkart
Freescale
Fujitsu
Gajshield
GE
Genpact India
Geodesic
Geometric Limited
GlobalEdge
GlobalLogic
GMR Group
Godrej Infotech
Google
Grapecity
Harita - TVS
HCL
HCL Technologies
Headstrong
Healthasyst
HEC Ltd
Hexaware
HFCL
Holool
Honeywell
HP
HTC Global Services
Huawei
Hughes
Hyundai
IBM
IBS Software Services
IGate
Ikanos
IKOS
Impetus
iNautix
Indecomm
IndiaBulls Power Limited
Inductis-EXL
Industrial Alliance
Infineon
Infogain
Infosys
Intec
Integra
Intel
Intergraph
ITC Infotech
Jindal Steel and Power Limited
KPIT
L & T
L & T Infotech
LG Soft
Linde India Ltd
LnT Emsys
LnT-ECC
Lucas - TVS
Mahindra Engineering Services Ltd
Mahindra Ltd
Maruti
Matrix
Maveric Systems
McAfee
Microland
Microsoft
Mindtree
Miraclesoft
MKCL
Motorola
Mu-Sigma
Nagarro
NASSCOM
NCR Corporation
Ness Technologies
Neudesic
NIIT Technologies
Novell
Nvidia
Oracle
Persistent
Philips
Planetasia
Polaris
Poornam Info Vision
PSI Data Systems Limited
Quest-Global
Quinnox
R Systems
Redpine
Reliance Energy
Robert Bosch
RS Software
Samsung
SAP labs India
Sapient
Sasken Communications
Schneider India
Serco
Siemens
Sierra Atlantic
SkyTECH
Soliton
Sonata Software
Sony India
SQL Star
Steria
Subex Limited
Sutherland Global Services
Syntel
Talisma
Tata motors
Tata technologies
Tata-ELXSI
TCE
TCS
Tech Mahindra
Temenos
Tesco
Texas Instruments
Thermax
ThoughtWorks
Torry Harris
Triad
Trianz
Trilogy
TVS Motor
Unisys
UnitedHealth Group
UST Global
UTC Aerospace System
Valuelabs
Vedanta
Verifone
Verizon
Virtusa
Vision Infotech
Vizual
VMware
Wipro
Yahoo
YASH Technologies
Zenith
Zensar Technologies
ZTE

BOB Technologies Technical Questions - 13 October 2003 (Allahabad)

Posted on :19-02-2016
BOB Technologies Technical Questions - 13 October 2003 (Allahabad):-

Q1. What will happen when you attempt to compile and run this code?

public class MyMain{
public static void main(String argv){
System.out.println(Hello cruel world);
}
}

a) The compiler will complain that main is a reserved word and cannot be used for a class
b) The code will compile and when run will print out Hello cruel world
c) The code will compile but will complain at run time that no constructor is defined
d) The code will compile but will complain at run time that main is not correctly defined


Q2. Why might you define a method as native?

a) To get to access hardware that Java does not know about
b) To define a new data type such as an unsigned integer
c) To write optimized code for performance in a language such as C/C++
d) To overcome the limitation of the private scope of a method


Q3. What will happen when you attempt to compile and run this code?

public class Mod{
public static void main(String argv[]){
}
public static native void a method();
}

a) Error at compilation: native method cannot be static
b) Error at compilation native method must return value
c) Compilation but error at run time unless you have made code containing native a method available
d) Compilation and execution without error


Q4. You want to loop through an array and stop when you come to the last element. Being a good java programmer and forgetting everything you ever knew about C/C++ you know that arrays contain information about their size. Which of the following can you use?

a) myarray.length(); 
b) myarray.length; 
c) myarray.size 
d) myarray.size();


Q5. How do you indicate where a component will be positioned using Flow layout?

a) North, South, East, West
b) Assign a row/column grid reference
c) Pass a X/Y percentage parameter to the add method
d) Do nothing, the Flow Layout will position the component


Q6. What most closely matches the appearance when this code runs?

import java.awt.*;
public class CompLay extends Frame{
public static void main(String argv[]){
CompLay cl = new CompLay();
}

CompLay(){
Panel p = new Panel();
p.setBackground(Color.pink);
p.add(new Button(One)); 


Q7. What will happen if you try to compile and run the following code?

public class MyClass {
public static void main(String arguments[]) {
amethod(arguments);
}
public void amethod(String[] arguments) {
System.out.println(arguments);
System.out.println(arguments[1]);
}
}

a) error Cant make static reference to void a method.
b) error method main not correct
c) error array must include parameter
d) a method must be declared with String


Q8. Which of the following are keywords or reserved words in Java?

a) if 
b) then 
c) go to 
d) while 
e) case


Q9. What will be the result of attempting to compile and run the following code?

abstract class MineBase {
abstract void amethod();
static int i;
}
public class Mine extends MineBase {
public static void main(String argv[]){
int[] ar=new int[5];
for(i=0;i < ar.length;i++)
System.out.println(ar[i]);
}
}

a) a sequence of 5 0s will be printed
b) Error: ar is used before it is initialized
c) Error Mine must be declared abstract
d) Index Out Of Boundes Error


Q10. What will happen when you attempt to compile and run this code?

abstract class Base{
abstract public void myfunc();
public void another(){
System.out.println(Another method);
}
}
public class Abs extends Base{
public static void main(String argv[]){
Abs a = new Abs();
a.a method();
}
public void myfunc(){
System.out.println(My Func);
}
public void amethod(){
myfunc();
}
}

a) The code will compile and run, printing out the words My Func
b) The compiler will complain that the Base class has non abstract methods
c) The code will compile but complain at run time that the Base class has non abstract methods
d) The compiler will complain that the method myfunc in the base class has no body.


Q11. What happens when you attempt to compile and run these two files in the same directory?

//File P1.java
package MyPackage;
class P1{
void afancymethod(){
System.out.println(What a fancy method);
}
}
//File P2.java
public class P2 extends P1{
public static void main(String argv[]){
P2 p2 = new P2();
p2.afancymethod();
}
}

a) Both compile and P2 outputs What a fancy method when run
b) Neither will compile
c) Both compile but P2 has an error at run time
d) P1 compiles cleanly but P2 has an error at compile time


Q12. Which of the following are fields of the GridBagConstraints class?

a) ipadx 
b) fill 
c) insets 
d) width


Q13. Which of the following lines will compile without warning or error?

a) float f=1.3; 
b) char c=a; 
c) byte b=257; 
d) boolean b=null; 
e) int i=10;


Q14. A byte can be of what size

a) -128 to 127 
b) (-2 power 8)-1 to 2 power 8 
c) -255 to 256 
d) depends on the particular implementation of the Java Virtual machine


Q15. What will happen if you try to compile and run the following code?

Public class Q {
public static void main(String argv[]){
int anar[]=new int[]{1,2,3};
System.out.println(anar[1]);
}
}

a) 1   
b) Error anar is referenced before it is initialized   
c) 2   
d) Error: size of array must be defined


Q16. What will be printed out if you attempt to compile and run the following code?

int i=9;
switch (i) {
default:
System.out.println(default);
case 0:
System.out.println(zero); 


Q17. How do you change the current layout manager for a container?

a) Use the set Layout method
b) Once created you cannot change the current layout manager of a component
c) Use the set Layout Manager method
d) Use the update Layout method


Q18. Which of the following are Java modifiers?

a) public 
b) private 
c) friendly 
d) transient 
e) vagrant


Q19. Which of the following are legal identifiers?

a) 2variable 
b) variable2 
c) _whatavariable 
d) _3_  
e) $anothervar 
f) #myvar


Q20. Which of the following will compile without error?

a) import java.awt.*;
package Mypackage;
class Myclass {}

b) package MyPackage;
import java.awt.*;
class MyClass{}

c) /*This is a comment */
package MyPackage;
import java.awt.*;
class MyClass{}


Q21. What will happen when you compile and run the following code?

public class MyClass{
static int i;
public static void main(String argv[]){
System.out.println(i);
}
}

a) Error Variable i may not have been initialized  
b) null   
c) 1   
d) 0


Q22. What will be printed out if this code is run with the following command line?

java myprog good morning
public class myprog{
public static void main(String argv[])
{
System.out.println(argv[2]);
}
}

a) myprog 
b) good 
c) morning 
d) Exception raised: java.lang.ArrayIndexOutOfBoundsException: 2


Q23. What will happen if you try to compile and run the following code?

public class Q {
public static void main(String argv[]){
int anar[]=new int[5];
System.out.println(anar[0]);
}
}

a) Error: anar is referenced before it is initialized   
b) null    
c) 0  
d) 5


Q24. What will be printed out if you attempt to compile and run the following code?

int i=1;
switch (i) {
case 0:
System.out.println(zero);
break;
case 1:
System.out.println(one);
case 2:
System.out.println(two);
default:
System.out.println(default);
}

a) one 
b) one, default 
c) one, two, default 
d) default


Q25. What best describes the appearance of an application with the following code?

import java.awt.*;
public class FlowAp extends Frame{
public static void main(String argv[]){
FlowAp fa=new FlowAp();
fa.setSize(400,300);
fa.setVisible(true);
}

FlowAp(){
add(new Button(One));
add(new Button(Two));
add(new Button(Three));
add(new Button(Four));
}//End of constructor

}//End of Application

a) A Frame with buttons marked One to Four placed on each edge.
b) A Frame with buttons marked One to four running from the top to bottom
c) A Frame with one large button marked Four in the Centre
d) An Error at run time indicating you have not set a Layout Manager


Q26. You want to find out the value of the last element of an array. You write the following code. What will happen when you compile and run it?

public class MyAr{
public static void main(String argv[]){
int[] i = new int[5];
System.out.println(i[5]);
}
}

a) An error at compile time
b) An error at run time
c) The value 0 will be output
d) The string null will be output


Q27. What will happen when you attempt to compile and run this code?

private class Base{}
public class Vis{
transient int iVal;
public static void main(String elephant[]){
}
}

a) Compile time error: Base cannot be private
b) Compile time error indicating that an integer cannot be transient
c) Compile time error transient not a data type
d) Compile time error malformed main method


Q28. What will happen when you attempt to compile and run this code?

class Base{
public final void amethod(){
System.out.println(amethod);
}
}

public class Fin extends Base{
public static void main(String argv[]){
Base b = new Base();
b.amethod();
}
}

a) Compile time error indicating that a class with any final methods must be declared final itself
b) Compile time error indicating that you cannot inherit from a class with final methods
c) Run time error indicating that Base is not defined as final
d) Success in compilation and output of a method at run time.



  
   






FreshersLive - No.1 Job site in India. Here you can find latest 2016 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.

closepop
closepop