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

How to define an Interface?
How to define an Interface? In Java Interface defines the methods but does not implement them. Interface can include constants. A class that implements the interfaces is bound to implement all the methods defined in Interface. Emaple of Interface: public interface sampleInterface { public void funct...
2012-05-24, 2226👍, 0💬

Can we use System.arraycopy() method to copy the same array?
Can we use System.arraycopy() method to copy the same array? Yes, you can. The source and destination arrays can be the same if you want to copy a subset of the array to another area within that array.
2012-09-04, 2223👍, 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, 2223👍, 0💬

What is the default value of the local variables?
What is the default value of the local variables? The local variables are not initialized to any default value, neither primitives nor object references. If you try to use these variables without initializing them explicitly, the java compiler will not compile the code. It will complain abt the loca...
2013-07-01, 2222👍, 0💬

What is the package?
What is the package? 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.
2013-02-21, 2220👍, 0💬

What's the main difference between a Vector and an ArrayList?
What's the main difference between a Vector and an ArrayList? Java Vector class is internally synchronized and ArrayList is not.
2012-06-22, 2218👍, 0💬

What is an abstract method?
What is an abstract method? An abstract method is a method whose implementation is deferred to a subclass. Or, a method that has no implementation.
2012-07-10, 2216👍, 0💬

Is Java a super set of JavaScript?
Is Java a super set of JavaScript? No. They are completely different. Some syntax may be similar.
2012-08-13, 2214👍, 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, 2214👍, 0💬

What is thread?
What is thread? A thread is an independent path of execution in a system.
2012-06-07, 2213👍, 0💬

What is the purpose of the Runtime class?
What is the purpose of the Runtime class? The purpose of the Runtime class is to provide access to the Java runtime system.
2012-07-07, 2211👍, 0💬

Name primitive Java types.
Name primitive Java types. The primitive types are byte, char, short, int, long, float, double, and boolean.
2012-07-23, 2210👍, 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, 2205👍, 0💬

What are the drawbacks of inheritance?
What are the drawbacks of inheritance? Since inheritance inherits everything from the super class and interface, it may make the subclass too clustering and sometimes error-prone when dynamic overriding or dynamic overloading in some situation. In addition, the inheritance may make peers hardly unde...
2012-08-29, 2204👍, 0💬

What is the difference between a Window and a Frame?
What is the difference between a Window and a Frame? Heavy weight components like Abstract Window Toolkit (AWT), depend on the local windowing toolkit. For example, java.awt.Button is a heavy weight component, when it is running on the Java platform for Unix platform, it maps to a real Motif button....
2012-07-16, 2203👍, 0💬

What's the difference between an interface and an abstract class?
What's the difference between an interface and an abstract class? An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implemen...
2012-05-21, 2203👍, 0💬

What is a static method?
What is a static method? A static method is a method that belongs to the class rather than any object of the class and doesn't apply to an object or even require that any objects of the class have been instantiated.
2012-07-11, 2202👍, 0💬

When is the ArithmeticException throwQuestion: What is the GregorianCalendar class?
When is the ArithmeticException throwQuestion: What is the GregorianCalendar class? The GregorianCalendar provides support for traditional Western calendars.
2012-07-04, 2201👍, 0💬

Does garbage collection guarantee that a program will not run out of memory?
Does garbage collection guarantee that a program will not run out of memory? No, it doesn't. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection.
2012-06-25, 2198👍, 0💬

Why would you use a synchronized block vs. synchronized method?
Why would you use a synchronized block vs. synchronized method? Synchronized blocks place locks for shorter periods than synchronized methods.
2012-07-27, 2195👍, 0💬

What is the ResourceBundle class?
What is the ResourceBundle class? The ResourceBundle class is used to store locale-specific resources that can be loaded by a program to tailor the program's appearance to the particular locale in which it is being run.
2012-08-07, 2192👍, 0💬

When a thread is created and started, what is its initial state?
When a thread is created and started, what is its initial state? A thread is in the ready state after it has been created and started.
2013-06-07, 2191👍, 0💬

Is the ternary operator written x : y ? z or x ? y : z ?
Is the ternary operator written x : y ? z or x ? y : z ? It is written x ? y : z.
2012-11-13, 2187👍, 0💬

How are the elements of a GridBagLayout organized?
How are the elements of a GridBagLayout organized? The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes.
2012-07-24, 2187👍, 0💬

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