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: One of possible solutions:public class NumberSpiralShape { /*** @param args*/public static void main(String[] args) { // TODO Auto-generated method stub int n = 3, i, side = n, x=0, y=0;int tab [][]= new int [n][n]; i=n*n;while(i>=1){for(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") ...
What could be possible scenarios to test sessions in any J2EE based application?
Latest Answer: You can test whether session is alive or not by using isAlive() method ...
Can you load the server object dynamically? If so what are the 3 major steps involved in it?
is it possible to define final keyword before constructor.if yes then describe?
Latest Answer: generally, final keyword is used when we want not to override the class, or not to over ride the subclass methods, but Constructor have the methods or datamembers to activated when we instantiaed, so, final keyword should not use before constructor.... ...
Can HashMap store null values?If yes, how many?What is singleton class? Give one example.Please describe the difference between 'int' and 'Integer',what is the purpose of 'Integer',
Latest Answer: Map Won't allow duplicates, So It will accept one null value.HashMap map = new HashMap();map.put(null, null);map.put(null, null); map.put(null, null);After adding 3 null key / value pairs. It will show only one null value.int => PrimitiveInteger ...
Name two classes that can store arbitrary number of objects.
Latest Answer: ArrayList and Vector ...
class A { // some code here} class B { // some code here}class Ex {public static void main(string args[]) {A a=new B();B b=new A();a.add();b.add();}Will this program run? Explain the referencing the object
Latest Answer: No it will not compile - as A does not extend B nor vice-versa when you try to assign an object of type B to a reference of type A (and vice-versa) you will get an 'Incompatible type' error message from the compiler! If inheritance were involved ...
We have a small requirement where we need to retrieve the e-mail ids of all the employees in the distributed list using LDAP, can any one give an idea how it can be done?
Latest Answer: Hey did you got answer for your query? i too is in requirement of answer for your query.infact, my requirement is "how to access and display the contacts in a distribution list using java?" ...
View page << Previous 1 [2] 3 4 5 6 7 8 9 10 Next >>

Go Top