|
|
|
Oracle: 1) Indexing and different Types. Explain 2) Explain about cursors. 3) Shared Pool 4) Can we drop a column? 5) Can we rename column? 6) Explain about free and used
J2EE: 1) Explain views in rational model 2) Why you do packaging? 3) EJB: If web container and EJB container, how communication happens. Is remote or Local? Is remote object are pass by reference 4) Composition? Explain 5) Polymorphism 6) Interfaces 7) System.out.println(): Explain 8) Switch and bulb. Design ?? 9) What are the services EJB can provide?? Without EJB how can we implement same 10)
Private interface (){ Private test(); // can we declare like this Static test1(); // can we declare like this }
11)Class A{ Public void xxx() { }
}
Class B extends A { Void xxx(){ // Overridding
} Void xxx(int c){ // Overloading
}
} 12) class Test { private void test1(int a) { System.out.println(“value of a =” + a); }
public static void main(String[] args){ Test t1 = new Test(); t1.test(‘a’); }
}
13) import java.util.*;
class Testing{
private void testString(){ String test = "BBB"; ArrayList aList = new ArrayList(); System.out.println(" Pankaja1 aList.size() = "+aList.size()); System.out.println(" Pankaja1 test = "+test); testString2(test, aList); System.out.println(" Pankaja2 test = "+test); System.out.println(" Pankaja2 aList.size() = "+aList.size());
}
private void testChar(int x){ System.out.println(" Pankaja1 testChar x = "+x); }
private void testString2(String pTest, ArrayList pList){ pTest = "AAAA"; pList.add("Pankaja"); System.out.println(" testString2 pList.size() = "+pList.size());
}
public static void main(String[] args) { System.out.println("testing !!!!"); Testing aTesting = new Testing(); aTesting.testString(); aTesting.testChar('a');
}
}
Output: Pankaja1 aList.size() = 0 Pankaja1 test = BBB testString2 pList.size() = 1 Pankaja2 test = BBB // Sting value cannot be pass by reference value Pankaja2 aList.size() = 1 // arraylist size = 1 because of pass by reference value. Pankaja1 testChar x = 97
14) What does finalize() method do?
/** * Method executeGetSequenceSP * * To execute the procedure GENERATE_SEQUENCE To get next * service request Id * * @param intClientId, strSeqName * @param strSeqName * * * @return * * @throws Exception */ public int executeGetSequenceSP(int intClientId, String strSeqName) throws Exception {
Connection con = null; int intSequence = 0; CallableStatement cstmt = null; int intSeq = 0;
try { con = getConnection();
String sql = "{call generate_sequence( ?, ?, ? ) }";
cstmt = con.prepareCall(sql);
// register output parameter types cstmt.registerOutParameter(3, java.sql.Types.INTEGER);
// set input parameters cstmt.setInt(1, intClientId); cstmt.setString(2, strSeqName);
// execute stored procedure cstmt.execute();
// retrieve values intSequence = cstmt.getInt(3); } catch (SQLException sqlex) { throw sqlex; } finally { try { if (cstmt != null) { cstmt.close(); } } catch (Exception e) {} finally { releaseConnection(con); } }
return intSequence; }
|
| Author: rambabu 14 May 2008 | Member Level: Silver Points : 2 |
very good questions man
|
| Author: hhhh 15 May 2008 | Member Level: Gold Points : 2 |
The questions were very thrilling .GOOD!!!!!!!
|