<< < 12 13 14 15 16 17 18 19 20 21 22 > >>   Sort: Date

There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java techniqu
There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it? If these classes are threads I'd consider notify() or notifyAll(). For regular classes you can use the Observer interface.
2013-04-19, 2075👍, 0💬

What does it mean that a method or field is "static"?
What does it mean that a method or field is "static"? Static variables and methods are instantiated only once per class. In other words they are class variables, not instance variables. If you change the value of a static variable in a particular object, the value of that variable changes for all in...
2013-06-20, 2074👍, 0💬

What must a class do to implement an interface?
What must a class do to implement an interface? It must provide all of the methods in the interface and identify the interface in its implements clause.
2012-10-26, 2074👍, 0💬

What an I/O filter?
What an I/O filter? An I/O filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another.
2013-01-02, 2073👍, 0💬

What is the GregorianCalendar class?
What is the GregorianCalendar class? The GregorianCalendar provides support for traditional Western calendars.
2012-10-19, 2073👍, 0💬

What is the range of the short type?
What is the range of the short type? The range of the short type is -(2^15) to 2^15 - 1.
2012-10-15, 2073👍, 0💬

What method must be implemented by all threads?
What method must be implemented by all threads? All tasks must implement the run() method, whether they are a subclass of Thread or implement the Runnable interface.
2013-06-17, 2070👍, 0💬

Is Java code slower than native code?
Is Java code slower than native code? Not really. As a platform-independent environment, the Java platform can be a bit slower than native code. However, smart compilers, well-tuned interpreters, and just-in-time bytecode compilers can bring performance close to that of native code without threateni...
2013-02-22, 2070👍, 0💬

If a variable is declared as private, where may the variable be accessed?
If a variable is declared as private, where may the variable be accessed? A private variable may only be accessed within the class in which it is declared.
2012-11-07, 2068👍, 0💬

What is the Vector class?
What is the Vector class? The Vector class provides the capability to implement a growable array of objects
2012-09-25, 2067👍, 0💬

What is the difference between a Window and a Frame?
What is the difference between a Window and a Frame? The Frame class extends Window to define a main application window that can have a menu bar.
2012-11-09, 2064👍, 0💬

What is the difference between a public and a non-public class?
What is the difference between a public and a non-public class? A public class may be accessed outside of its package. A non-public class may not be accessed outside of its package.
2013-01-22, 2062👍, 0💬

What is a layout manager?
What is a layout manager? A layout manager is an object that is used to organize components in a container.
2013-01-16, 2062👍, 0💬

What is the % operator?
What is the % operator? It is referred to as the modulo or remainder operator. It returns the remainder of dividing the first operand by the second operand.
2012-11-09, 2062👍, 0💬

Name three subclasses of the Component class.
Name three subclasses of the Component class. Box.Filler, Button, Canvas, Checkbox, Choice, Container, Label, List, Scrollbar, or TextComponent
2012-10-19, 2062👍, 0💬

Name Container classes
Name Container classes Window, Frame, Dialog, FileDialog, Panel, Applet, or ScrollPane
2013-04-02, 2059👍, 0💬

What is the difference between a Scrollbar and a ScrollPane?
What is the difference between a Scrollbar and a ScrollPane? A Scrollbar is a Component, but not a Container. A ScrollPane is a Container. A ScrollPane handles its own events and performs its own scrolling.
2013-04-05, 2058👍, 0💬

Describe the principles of OOPS
Describe the principles of OOPS There are three main principals of oops which are called Polymorphism, Inheritance and Encapsulation.
2013-02-28, 2052👍, 0💬

Which containers use a FlowLayout as their default layout?
Which containers use a FlowLayout as their default layout? The Panel and Applet classes use the FlowLayout as their default layout.
2013-04-09, 2051👍, 0💬

What is the return type of a program's main() method?
What is the return type of a program's main() method? A program's main() method has a void return type.
2012-12-21, 2051👍, 0💬

You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use: ArrayList or Li
You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use: ArrayList or LinkedList? ArrayList
2013-04-16, 2050👍, 0💬

Which characters may be used as the second character of an identifier,but not as the first character of an identifier?
Which characters may be used as the second character of an identifier,but not as the first character of an identifier? The digits 0 through 9 may not be used as the first character of an identifier but they may be used after the first character of an identifier.
2013-02-14, 2049👍, 0💬

To what value is a variable of the boolean type automatically initialized?
To what value is a variable of the boolean type automatically initialized? The default value of the boolean type is false.
2013-01-22, 2049👍, 0💬

What is the common usage of serialization?
What is the common usage of serialization? Whenever an object is to be sent over the network, objects need to be serialized. Moreover if the state of an object is to be saved, objects need to be serilazed.
2013-05-21, 2047👍, 0💬

<< < 12 13 14 15 16 17 18 19 20 21 22 > >>   Sort: Date