Professional Documents
Culture Documents
Q.1 You are creating a space flight simulation for a start-up aeronautics company. This
simulation program must calculate the orbital mechanics and display the flight path on a
graphics screen.
What type of data is most appropriate for calculating the orbital mechanics equations?
A pixel
B boolean
C integer
D floating point
E enumerated type
Ans-D
Q.2 Which two are required for proper information hiding? (Choose two.)
Ans – B,D
a----b
Ans- A
class MyClass {
- x : int;
- y : int;
+ z : int;
- ch : char;
+ vel : float;
+ acc : float;
class MyClass {
private x : int;
private y : int;
public z : int;
private ch : char;
}
C
class MyClass {
- int x;
- int y;
+ int z;
- char ch;
+ float vel;
+ float acc;
class MyClass {
private int x;
private int y;
public int z;
class MyClass {
private:
int x;
int y;
char ch;
public:
int z;
float vel;
float acc;
}
Ans- D
Q.5 Which statement declares a floating point variable and assigns it the initial value of 100?
Ans-B
Q.6 Given:
x = "abcedfghijklmnopqrstuvwxyz"
y = "lmno"
Which line of code will remove the y string from the x string, and store it in the z variable?
A z=x-y
B z = x.remove(y)
C z = x.substract(y)
D z = x.replace(y, "")
Ans- D
Q.7 Which package contains APIs that are useful for distributed programming and
communication?
A java.awt
B java.net
C java.util
D javax.swing
Ans- B
B HTTP
C JDBC
D RDBMS
E Java Beans
F Entity Beans
Ans A,D
Q.9 Which two types of applications are appropriate for J2ME? (Choose two.)
A games
B word processing
Ans A,C
C a web designer who generates dynamic web pages to create user interfaces
D a Java programmer who creates components that represent data in a relational
database
Ans - B