Java J2EE Interview Questions
Questions Answers Views Company eMail

public class Test { public static void main(String[] args) { int countA = 0; int countB = 0; int countC = 0; int countD = 0; int countE = 0; int countF = 0; int countG = 0; int countH = 0; int countI = 0; int countJ = 0; int countK = 0; int countL = 0; int countM = 0; int countN = 0; int countO = 0; int countP = 0; int countQ = 0; int countR = 0; int countS = 0; int countT = 0; int countU = 0; int countV = 0; int countW = 0; int countX = 0; int countY = 0; int countZ = 0; } } Can anybody tell me any alternate solution(like loop or something) to automate this initialization process. Ex:- for(char chr='A';chr<='Z'; chr++) { (int) String "count"+chr = 0; }

1841

what is different between static and non static methods ,using example

2 3200

Which collection object is faster to retrieving the data and inserting the data into it.

Jamcracker, Virtusa,

2 7296

what is the difference b/w static and final methods?

1 3775

MY code is: public class P1{ public static void main(String ar[]) { class.forName("java.lang.String"); } } errors i got are :New.java:5: error: expected class.forName("java.lang.String"); ^ New.java:5: error: invalid method declaration; return type required class.forName("java.lang.String"); ^ New.java:5: error: illegal start of type class.forName("java.lang.String"); ^ New.java:7: error: reached end of file while parsing } ^ 4 errors HELP ME>......

3 4327

what is data binding? give the example

TCS,

1 4125

what is deadlock in threads? with example

CTS, XOXO,

2 4660

Difference between abtsract & final

Nous,

1 3227

Difference between error and exception

Nous, TCS,

3 4975

Superclass of exception

Nous,

4 5174

Write POJO class as a key to hashmap???

2 11807

my interviewer asked me what technical specification you used how to answer that question

1922

WAP to illustrate the use of interface

2 3254

What is difference between JMS and Web Services?

4410

Difference between Map & Hashmap

Mastek,

2 5411


Un-Answered Questions { Java J2EE }

What one should take care of, while serializing the object?

472


Can we write class inside a class in java?

535


In how many ways we can do synchronization in java?

511


Will the general public have access to the infobus apis?

517


What is transactional spring?

135






List the advantages of using datasource?

547


Why spring cloud is required?

161


Can singleton class be inherited in java?

507


Why do we use sendredirect() method?

540


what is daemon thread and which method is used to create the daemon thread? : Java thread

515


What happens when a failure occurs and the stub cannot connect to a weblogic server instance?

515


Is it possible to connect to multiple databases simultaneously?

540


What do you mean by of string::valueof expression in java 8?

531


what is object-oriented programming in java?

574


Why java is called portable language?

481