When there is no methods in the marker interface, then what is the use of marker interface. What is the functionality of the interface. Why do we need to implement marker interface?
Latest Answer: Marker interface is an interface with out having any implementation methods.By implementing this interfaces, we will specify some special behaviour to implemented class.Examples: Serializable, CloneableFor example if we want to create a clone for a an ...
What are all the methods used for Inter Thread communication and what is the class in which these methods are defined?
Latest Answer: When Threads are executing on shared resources inorder to establish the communication among them the Object class providing some native methods like wait(), notify(), notifyAll(). ...
In how many ways we can create an object? Explain with example.
Latest Answer: 1.Using New KeyWord2.Using ClassForName3.Clone ...
What is the meaning of supplying string[] args to main method?
Latest Answer: public static void main(String args[]) This array of Strings is the mechanism through which the runtime system passes information to your application. Each String in the array is called a command line argument. Command line arguments let users affect ...
An array A is of size N. Write a java method that jumbles all values in the array. All possible permutations must be possible and chances for each possible permutation must be equal. For example, size
Latest Answer: public void jumble(){String a=new String{"A","B","C"};ArrayList ar=new ArrayList();for (i=0;i
Suppose a Super Class method throws an exception and this method is Overriden in the subclass with no exception. Now if you create a super class reference that has a subclass object. This throws a compile
Latest Answer: Over Riding means Same methosd names and in the methods having same parameters. ...
What does "wrapping" an object mean?
Latest Answer: Wrapping an object means we are covering that object, say for example in Java we can say String is a class as well as String is a data type.String s;  // here s is object of String class    String.valueOf(12) // here String is a class , valueOf() ...
How to pass commandline arguments in main function through Eclipse Tools (editors).
Latest Answer: Click the Run menu barNow click the Open Run DialogueA new window will be opened.In that window click the Java applications thenA new sub menu will be opened in that select Arguments menu andType the Arguments with space.Click run to view your result ...
How many methods to read numbers and characters and what should be used.
Latest Answer: We have readers and streams. Readers are used to read characters and streams are used to read bytes, streams returns numbers i.e. byte number. ...
I'm trying to write an Iterator class for a LinkedList class that I wrote.One of the methods is "public E next()"I try to return an "E" but eclipse says "cannot convert from
Latest Answer: Object is a class and E is a generic type parameter . And Iterator class alwayes return Object so to fix this problem, you need to call it. For exampleimport java.util.ArrayList;import java.util.Iterator;class list { ArrayList list = new ...
View page [1] 2 3 4 5 6 7 8 9 10 Next >>

Go Top