if i have a class that can extend abs class n implement interface...and it doesn't have to achieve inheritance ,doesn't have to extend any other class then which 1 should i use between extending
Latest Answer: interface cde { void abc();}class abc implements cde { public void abc() {System.out.println("hai"); }}class greek { ...
Latest Answer: public class sortArray { public sortArray() { } public int[] sortToArray(int []a) { int len=a.length; ...
What is marker sweeper algorithm in garbage collection?
Latest Answer: Mark and Sweep garbage collection is 2 phase algorithm.In the first phase, it finds and marks all accessible objects recursively and in second phase it scans through the heap and reclaims all the unmarked objects.Mark and sweep algo won't reclaim ...
Explain why we go for interface instead of multiple inheritnace?
Latest Answer: Suppose we have 3 classes A,B,C. Here C is derived from classes A and B. HERE A and B classes have same method suppose print(). As we know we can call base class methods by creating objects of derived class. Suppose if i call the print() method which ...
Followign down error i get when i try to login to my page.here my front login page is open and then when i try to login that time this error i reciving.here my server is AIX server and TOMCAT webserver
Latest Answer: Please let us know what action are you trying to perform after login? Are you getting this error while login? Have you stored login members list and trying to retrieve them from DB and while retrieving are you getting this error? if so check up your JDBC ...
Write a code that returns the number of names in a given array that end in either "ie" or "y"?
what is phantom memory and how it is useful?
Latest Answer: A phantom reference lets you do final touch up closing on an object, even after it has been declared dead — no longer referenced by any live object.Java has four orders of strength in holding onto Objects. In descending order from strongest to weakest ...
I need an algorithm for some program. I'll take some number (say 'n'), then i should print the numbers in spiral shape starting from square(n). Can any one pls help me..Ex: if n=3, it should
Latest Answer: //spiral//by datdo//translated C codepublic class Spiral {int n =3;public static int SPIRALHEIGHT = n;public static int SPIRALWIDTH = n;public static main(String[] args) { int matrix[SPIRALWIDTH][SPIRALHEIGHT]; int ...
how to convert or achieve the program from .class file??
Latest Answer: Using jadclipse pluging installed in ur IDE,u can view the class files like java files, but u will not be able to edit.To make a class file into java file in editable format, get the jad.exe filein crompt prompt, goto the file location, keep the jad.exe ...
What is Nullpointer Exception How it will be reduced
Latest Answer: There are many reasons to get a Null pointer Exception . Burn it in ur Brain : NullPointerException can occur only on OBJECTS . not primitives.the above said answer holds a good example .Example 2: String s = null; System.out.println(s.concat("asdad") ...
View page << Previous 1 [2] 3 4 5 6 7 8 9 10 Next >>

Go Top