JavaThis is a featured page



Question:

What does a well-written OO program look like?(donated in July, 2005)

Answer:

A well-written OO program exhibits recurring structures that promote abstraction, flexibility, modularity and elegance.


Question:

Can you have virtual functions in Java? (donated in July 2005)

Answer:

Yes, all functions in Java are virtual by default. This is actually a pseudo trick question because the word "virtual" is not part of the naming convention in Java ( as it is in C++, C-sharp and VB.NET), so this would be a foreign concept for someone who has only coded in Java. Virtual functions or virtual methods are functions or methods that will be redefined in derived classes.


Question:

What is more advisable to create a thread, by implementing a Runnable interface or by extending Thread class?(donated in June 2005)

Answer:

Strategically speaking, threads created by implementing Runnable interface are more advisable. If you create a thread by extending a thread class, you cannot extend any other class. If you create a thread by implementing Runnable interface, you save a space for your class to extend another class now or in future.


Question:

An application needs to load a library before it starts to run, how to code?

Answer:

One option is to use a static block to load a library before anything is called. For example,

class Test {
static {
System.loadLibrary("path-to-library-file");
}
....
}

When you call new Test(), the static block will be called first before any initialization happens. Note that the static block position may matter.


Question:

What is a platform?

Answer:

A platform is the hardware or software environment in which a program runs. Most platforms can be described as a combination of the operating system and hardware, like Windows 2000 and XP, Linux, Solaris, and MacOS.


Question:

What is the main difference between Java platform and other platforms?

Answer:

The Java platform differs from most other platforms in that it's a software-only platform that runs on top of other hardware-based platforms.

The Java platform has two components:

1. The Java Virtual Machine (Java VM)
2. The Java Application Programming Interface (Java API)


Question:

What is the Java Virtual Machine?

Answer:

The Java Virtual Machine is a software that can be ported onto various hardware-based platforms.


Question:

What is the Java API?

Answer:

The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets.


Question:

What is the package?

Answer:

The package is a Java namespace or part of Java libraries. The Java API is grouped into libraries of related classes and interfaces; these libraries are known as packages.


Question:

What is the package?

Answer:

The package is a Java namespace or part of Java libraries. The Java API is grouped into libraries of related classes and interfaces; these libraries are known as packages.





vijayavenkatesh.2006
vijayavenkatesh.2006
Latest page update: made by vijayavenkatesh.2006 , Dec 30 2006, 1:55 AM EST (about this update About This Update vijayavenkatesh.2006 customise - vijayavenkatesh.2006

No content added or deleted.

- complete history)
Keyword tags: radio
More Info: links to this page

Anonymous  (Get credit for your thread)


There are no threads for this page.  Be the first to start a new thread.