Interview Questions

Q:

public class Threads2 implements Runnable {

public void run() {

System.out.println("run.");

throw new RuntimeException("Problem");

Which among the following is true?

}

public static void main(String[] args) {

Thread t = new Thread(new Threads2());

t.start();

System.out.println("End of method.");

}

}

A) java.lang.RuntimeException: Problem B) run. java.lang.RuntimeException: Problem
C) End of method. java.lang.RuntimeException: Problem D) End of method. run. java.lang.RuntimeException: Problem
 
Answer & Explanation Answer: D) End of method. run. java.lang.RuntimeException: Problem

Explanation:

Only D can be true

Report Error

View Answer Report Error Discuss

Filed Under: Java

0 27943
Q:

Which tag is used to display the numbered list?

 

1) <ol> </ol>    2) <li></li>     3) <ul> </ul>    4) <dl> </dl>

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

Explanation:

Use HTML tag <ol> element to define an ordered list.

Use the HTML type attribute to define the numbering type. Use the HTML <li> element to define a list item. Use the HTML <dl> element to define a description list.

 

Hence, as numbered list come under ordered list tag <ol> tag is used for numbered list.

Report Error

View Answer Report Error Discuss

13 27887
Q:

What is DHTML? What are the features of DHTML?

Answer

DHTML stands for Dynamic HTML. The first thing that we need to clear about DHTML is that it is neither a language like HTML, JavaScript etc. nor a web standard. It is just a combination of HTML, JavaScript and CSS. It just uses these languages features to build dynamic web pages. DHTML is a feature of Netscape Communicator 4.0, and Microsoft Internet Explorer 4.0 and 5.0 and is entirely a "client-side" technology.  


Features of DHTML:


- Simplest feature is making the page dynamic.


- Can be used to create animations, games, applications, provide new ways of navigating through web sites.


- DHTML use low-bandwidth effect which enhance web page functionality.


- Dynamic building of web pages is simple as no plug-in is required.


- Facilitates the usage of events, methods and properties and code reuse. 

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

36 27399
Q:

Javascript is interpreted by

A) Server B) Object
C) Client D) None of the above
 
Answer & Explanation Answer: C) Client

Explanation:

JavaScript is an interpreted language, not a compiled language. A program such as C++ or Java needs to be compiled before it is run.

The source code is passed through a program called a compiler, which translates it into bytecode that the machine understands and can execute.

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: Analyst , IT Trainer

21 26148
Q:

How much time needs to pass for an A/R account to be considered delinquent?

Answer

After 90 days of the due date

Report Error

View answer Workspace Report Error Discuss

17 25789
Q:

void waitForSignal() {

Object obj = new Object();

synchronized (Thread.currentThread()) {

obj.wait();

obj.notify();

}

}

Which statement is true?

A) This code can throw an InterruptedException. B) This code can throw an IllegalMonitorStateException.
C) This code can throw a TimeoutException after ten minutes D) All the above
 
Answer & Explanation Answer: B) This code can throw an IllegalMonitorStateException.

Explanation:

It will throw  IllegalMonitorStateException.

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: IT Trainer

6 25699
Q:

A subquery in an SQL SELECT statement is enclosed in

A) [ ] B) { }
C) < > D) ( )
 
Answer & Explanation Answer: D) ( )

Explanation:

A subquery in an SQL SELECT statement is enclosed in parenthesis (...).

Report Error

View Answer Report Error Discuss

0 25335
Q:

Which of the following is a properly defined structure?

A) struct {int a;} B) struct a_struct {int a;}
C) struct a_struct int a; D) struct a_struct {int a;};
 
Answer & Explanation Answer: D) struct a_struct {int a;};

Explanation:

The a_struct is declared as structure name and its data element is a.

Report Error

View Answer Report Error Discuss

Filed Under: C++

12 24859