<< < 8 9 10 11 12 13 14 15 16 17 18 > >>   Sort: Date

What is the relationship between clipping and repainting?
What is the relationship between clipping and repainting? When a window is repainted by the AWT painting thread, it sets the clipping regions to the area of the window that requires repainting.
2012-11-30, 2205👍, 0💬

How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bi...
2012-09-27, 2201👍, 0💬

How do you restrict a user to cut and paste from the html page?
How do you restrict a user to cut and paste from the html page? Using Servlet or client side scripts to lock keyboard keys. It is one of solutions.
2012-08-10, 2200👍, 0💬

When can an object reference be cast to an interface reference?
When can an object reference be cast to an interface reference? An object reference can be cast to an interface reference when the object implements the referenced interface.
2012-07-13, 2196👍, 0💬

What is polymorphism?
What is polymorphism? Polymorphism means "having many forms". It allows methods (may be variables) to be written that needn't be concerned about the specifics of the objects they will be applied to. That is, the method can be specified at a higher level of abstraction and can be counted on to work e...
2012-08-14, 2194👍, 0💬

What is an abstract method?
What is an abstract method? An abstract method is a method whose implementation is deferred to a subclass.
2012-11-01, 2192👍, 0💬

Can a lock be acquired on a class?
Can a lock be acquired on a class? Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object.
2012-09-17, 2190👍, 0💬

ArithmeticException?
ArithmeticException? The ArithmeticException is thrown when integer is divided by zero or taking the remainder of a number by zero. It is never thrown in floating-point operations.
2012-09-12, 2189👍, 0💬

How do you create a read-only collection?
How do you create a read-only collection? The Collections class has six methods to help out here: 1. unmodifiableCollection(Collect ionc) 2. unmodifiableList(List list) 3. unmodifiableMap(Map m) 4. unmodifiableSet(Set s) 5. unmodifiableSortedMap(SortedMa pm) 6. unmodifiableSortedSet(SortedSe ts) If ...
2012-08-30, 2189👍, 0💬

Can you write a Java class that could be used both as an applet as well as an application?
Can you write a Java class that could be used both as an applet as well as an application? A. Yes. Add a main() method to the applet.
2012-08-20, 2189👍, 0💬

What happens if you dont initialize an instance variable of any of the primitive types in Java?
What happens if you dont initialize an instance variable of any of the primitive types in Java? Java by default initializes it to the default value for that primitive type. Thus an int will be initialized to 0, a boolean will be initialized to false.
2013-06-27, 2188👍, 0💬

What is a transient variable?
What is a transient variable? A transient variable is a variable that may not be serialized.
2012-09-13, 2188👍, 0💬

What is a Container in a GUI?
What is a Container in a GUI? A Container contains and arranges other components (including other containers) through the use of layout managers, which use specific layout policies to determine where components should go as a function of the size of the container.
2012-08-13, 2185👍, 0💬

What are the problems faced by Java programmers who don't use layout managers?
What are the problems faced by Java programmers who don't use layout managers? Without layout managers, Java programmers are faced with determining how their GUI will be displayed across multiple windowing systems and finding a common sizing and positioning that will work within the constraints impo...
2012-07-25, 2184👍, 0💬

Is sizeof a keyword?
Is sizeof a keyword? The sizeof operator is not a keyword.
2012-10-01, 2183👍, 0💬

Does the code in finally block get executed if there is an exception and a return statement in a catch block?
Does the code in finally block get executed if there is an exception and a return statement in a catch block? If an exception occurs and there is a return statement in catch block, the finally block is still executed. The finally block will not be executed when the System.exit(1) statement is execut...
2012-08-10, 2183👍, 0💬

Binary value in Switch case
Is it possible to pass a binary value to 'case' of 'switch' statement?The control value which we are using to test is also binary. switch(binary value) { case 0000: System.out.println(" "); break; case 0001: System.out.println(" "); break; }
2014-02-20, 2182👍, 0💬

Explain the usage of Java packages.
Explain the usage of Java packages. This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when different packages have classes with the same names. Packages access level also allows you to protect data from being used by the non-authorize...
2012-08-09, 2182👍, 0💬

If an object is garbage collected, can it become reachable again?
If an object is garbage collected, can it become reachable again? Once an object is garbage collected, it ceases to exist. It can no longer become reachable again.
2013-01-02, 2180👍, 0💬

What is a task's priority and how is it used in scheduling?
What is a task's priority and how is it used in scheduling? A task's priority is an integer value that identifies the relative order in which it should be executed with respect to other tasks. The scheduler attempts to schedule higher priority tasks before lower priority tasks.
2012-10-12, 2180👍, 0💬

What is the benefit of subclass?
What is the benefit of subclass? Generally: The sub class inherits all the public methods and the implementation. The sub class inherits all the protected methods and their implementation. The sub class inherits all the default(non-access modifier) methods and their implementation. The sub class als...
2012-08-16, 2180👍, 0💬

How would you make a copy of an entire Java object with its state?
How would you make a copy of an entire Java object with its state? Have this class implement Cloneable interface and call its method clone().
2013-04-16, 2178👍, 0💬

What is shallow copy or shallow clone in array cloning?
What is shallow copy or shallow clone in array cloning? Cloning an array invloves creating a new array of the same size and type and copying all the old elements into the new array. But such copy is called shallow copy or shallow clone because any changes to the object would be reflected in both arr...
2012-09-05, 2167👍, 0💬

How to add menushortcut to menu item?
How to add menushortcut to menu item? If you have a button instance called aboutButton, you may add menu short cut by calling aboutButton.setMnemonic('A'), so the user may be able to use Alt+A to click the button.
2012-08-17, 2166👍, 0💬

<< < 8 9 10 11 12 13 14 15 16 17 18 > >>   Sort: Date