Interview Questions

Q:

Which of the following best describes JavaScript?

A) a scripting language precompiled in the browser. B) an object-oriented scripting language
C) a low-level programming language. D) a compiled scripting language.
 
Answer & Explanation Answer: B) an object-oriented scripting language

Explanation:

JavaScript, often abbreviated as JS, is a high-level, interpreted programming language that conforms to the ECMAScript specification.

 

JavaScript has

* curly-bracket syntax,

* dynamic typing,

* prototype-based object-orientation, and

* first-class functions.

 

Uses :

It is well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat.

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: IT Trainer

3 14465
Q:

public abstract class Shape {

private int x;

private int y;

public abstract void draw();

public void setAnchor(int x, int y) {

this.x = x;

this.y = y;

}

}

Which two classes use the Shape class correctly?

A) public class Circle implements Shape { private int radius; B) public abstract class Circle extends Shape { private int radius; }
C) public class Circle extends Shape { private int radius; public void draw(); D) None
 
Answer & Explanation Answer: B) public abstract class Circle extends Shape { private int radius; }

Explanation:

Only B is true

Report Error

View Answer Report Error Discuss

Filed Under: Java

0 14297
Q:

How many of the following will follow JavaBean Listener naming rules?

addListener

addMouseListener

deleteMouseListener

removeMouseListener

registerMouseListener

 

A) 1 B) 2
C) 3 D) 4
 
Answer & Explanation Answer: B) 2

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Java

0 14197
Q:

Which of the following are capabilities of functions in JavaScript?

A) Accept parameters B) Return a value
C) Accept parameters and Return a value D) None of the above
 
Answer & Explanation Answer: A) Accept parameters

Explanation:

Accept parameters are capabilities of functions in JavaScript.

Report Error

View Answer Report Error Discuss

Filed Under: Java
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Database Administration , IT Trainer

13 14196
Q:

How do you put a message in the browser's status bar ?

A) status("put your message here") B) window.status = "put your message here"
C) statusbar = "put your message here" D) window.status("put your message here")
 
Answer & Explanation Answer: B) window.status = "put your message here"

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Web Technology

5 13716
Q:

What will be the output of the following code snippet?

Object s1 = new String("Hello");
Object s2 = new String("Hello");
 
if(s1 == s2) {
  System.out.println("s1 and s2 are ==");
}else if (s1.equals(s2)) {
  System.out.println("s1 and s2 are equals()");
}

Answer

Answer : s1 and s2 are equals()


 


Explanation :



 

Report Error

View answer Workspace Report Error Discuss

Subject: Java

8 13650
Q:

Which of the following statements are equal for a variable declared in the interface ?

1. int X=10
2. public int X=10
3. public static final int X=10

A) Only 1 and 2 are equal B) Only 2 and 3 are equal
C) All are unequal D) All are equal
 
Answer & Explanation Answer: D) All are equal

Explanation:

All the statements are equal because inside an interface a variable declared will be public static final by default 

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: IT Trainer

0 13636
Q:

Which of the following attribute can hold the JavaScript version?

A) script B) version
C) language D) none of the above
 
Answer & Explanation Answer: C) language

Explanation:

Language attribute contains the javascript versions.

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: Analyst , IT Trainer , Software Architect

8 13340