<< < 3 4 5 6 7 8 9 10 11 12 13 > >>   Sort: Date

Can each Java object keep track of all the threads that want to exclusively access to it?
Can each Java object keep track of all the threads that want to exclusively access to it? Yes. Use Thread.currentThread() method to track the accessing thread.
2012-06-13, 2676👍, 0💬

What is the difference between the Font and FontMetrics classes?
What is the difference between the Font and FontMetrics classes? The FontMetrics class is used to define implementation-specific properties, such as ascent and descent, of a Font object
2012-07-17, 2672👍, 0💬

Name two subclasses of the TextComponent class.
Name two subclasses of the TextComponent class. TextField and TextArea
2012-10-29, 2670👍, 0💬

What is synchronization and why is it important?
What is synchronization and why is it important? With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of...
2012-05-31, 2664👍, 0💬

Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?
Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written? Yes, it does. The FileNoFoundException is inherited from the IOException. Exception's subclasses have to be caught first.
2012-06-13, 2662👍, 0💬

What state does a thread enter when it terminates its processing?
What state does a thread enter when it terminates its processing? When a thread terminates its processing, it enters the dead state.
2012-09-20, 2661👍, 0💬

What is the Set interface?
What is the Set interface? The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements.
2012-08-02, 2654👍, 0💬

If a class is located in a package, what do you need to change in the OS environment to be able to use it?
If a class is located in a package, what do you need to change in the OS environment to be able to use it? You need to add a directory or a jar file that contains the package directories to the CLASSPATH environment variable. Let's say a class Employee belongs to a package com.xyz.hr; and is located...
2012-05-28, 2654👍, 0💬

Which TextComponent method is used to set a TextComponent to the read-only state?
Which TextComponent method is used to set a TextComponent to the read-only state? setEditable()
2012-11-28, 2653👍, 0💬

Can an anonymous class be declared as implementing an interface and extending a class?
Can an anonymous class be declared as implementing an interface and extending a class? An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.
2012-06-28, 2653👍, 0💬

What is new with the stop(), suspend() and resume() methods in JDK 1.2??
What is new with the stop(), suspend() and resume() methods in JDK 1.2?? The stop(), suspend() and resume() methods have been deprecated in JDK 1.2.
2012-09-18, 2651👍, 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, 2650👍, 0💬

What is the preferred size of a component?
What is the preferred size of a component? The preferred size of a component is the minimum component size that will allow the component to display normally.
2012-06-06, 2648👍, 0💬

Can Java object be locked down for exclusive use by a given thread?
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by putting it in a "synchronized" block. The locked object is inaccessible to any thread other than the one that explicitly claimed it.
2012-06-11, 2647👍, 0💬

How many methods in Object class?
How many methods in Object class? This question is not asked to test your memory. It tests you how well you know Java. Ten in total. clone() equals() & hashcode() getClass() finalize() wait() & notify() toString()
2012-06-29, 2646👍, 0💬

What is the difference between final, finally and finalize?
What is the difference between final, finally and finalize? Short answer: final - declares constant finally - relates with exception handling finalize - helps in garbage collection If asked to give details, explain: final field, final method, final class try/finally, try/catch/finally protected void...
2012-09-03, 2645👍, 0💬

When should the method invokeLater()be used?
When should the method invokeLater()be used? This method is used to ensure that Swing components are updated through the event-dispatching thread.
2012-06-29, 2643👍, 0💬

What is multi-threading?
What is multi-threading? Multi-threading means various threads that run in a system.
2012-06-08, 2643👍, 0💬

What do you understand by Synchronization?
What do you understand by Synchronization? Synchronization is a process of controlling the access of shared resources by the multiple threads in such a manner that only one thread can access one resource at a time. In non synchronized multithreaded application, it is possible for one thread to modif...
2012-05-22, 2643👍, 0💬

What is an IO filter?
What is an IO filter? An IO 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.
2012-08-02, 2639👍, 0💬

Can a .java file contain more than one java classes?
Can a .java file contain more than one java classes? Yes, a .java file contain more than one java classes, provided at the most one of them is a public class.
2013-06-24, 2638👍, 0💬

What would you use to compare two String variables - the operator == or the method equals()?
What would you use to compare two String variables - the operator == or the method equals()? I'd use the method equals() to compare the values of the Strings and the == to check if two variables point at the same instance of a String object.
2012-06-07, 2633👍, 0💬

Which class should you use to obtain design information about an object?
Which class should you use to obtain design information about an object? The Class class is used to obtain information about an object's design.
2012-07-23, 2632👍, 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-06-05, 2632👍, 0💬

<< < 3 4 5 6 7 8 9 10 11 12 13 > >>   Sort: Date