Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.


Please wait...

Technical Interview Questions and Answers :: Java

    Question :: 1

    Difference between StringBuffer and StringBuilder
    Answer:

    StringBuffer:




    1. StringBuffer is less efficient than StringBuilder.

    2. StringBuffer is synchronized i.e. thread safe. It means two threads can't call the methods of StringBuffer simultaneously.



    StringBuilder:




    1. StringBuilder is more efficient than StringBuffer.

    2. StringBuilder is non-synchronized i.e. not thread safe. It means two threads can call the methods of StringBuilder simultaneously.

    Please Login First :

    Tags:Aricent

    Question :: 2
    Why doesn't Java support multiple inheritance?
    Answer:

    Java doesn't supports multiple inheritence because it causes ambiguity.

    Please Login First :

    Tags:No Tags on this question yet!

    Question :: 3
    Write a JDBC program to retrieve student details?
    Answer:

    import java.sql.*;


    public class stuinfo{


    public static void main(String ar[]){


    try[


    class.forName("sun.jdbc.odbc.JdbcOdbcDriver");


    Connection con=DriverManager.getConnection("Jdbc:Odbc:stu");


    Statement st=con.createStatement();


    ResultSet rs=st.excecuteQuery("select * from studin");


    while(rs.next()){


    String name=rs.getString(1);


    String rollno=rs.getString(2);


    int m1=rs.getInt(3);


    int m2=rs.getInt(4);


    int m3=rs.getInt(5);


    String dept=rs.getString(6);


    int year=rs.getInt(7);


    System.out.ptintln("Name:" name);


    System.out.ptintln("Roll No.:" rollno);


    System.out.ptintln("Marks1 :" m1);


    System.out.ptintln("Marks2 :" m2);


    System.out.ptintln("Marks3 :" m3);


    System.out.ptintln("Department :" dept);


    System.out.ptintln("Year :" year);


    }


    }catch(Exception e){System.out.println ("Exception" e);}


    }


    }

    Please Login First :

    Tags:TCS

    Question :: 4
    How you implement https in JSP?
    Answer:

    No Discussion on this question yet!

    Please Login First :

    Tags:TCS

    Question :: 5
    What are collections in java?
    Answer:

    A collection is an object that can hold references to other objects. The collection interfaces declare the operations that can be performed on each type ofcollection. The classes and interfaces of thecollections framework are in package java.util.

    Please Login First :
    Question :: 6
    What are the exceptions in java?
    Answer:

    An exception (or exceptional event) is a problem that arises during the execution of a program. When an Exception occurs the normal flow of the program is disrupted and the program/Application terminates abnormally.

    Please Login First :

    Tags:TCS Virtusa

    Question :: 7
    What are the types of classes in java?
    Answer:

    No Discussion on this question yet!

    Please Login First :

    Tags:iGate Virtusa

    Question :: 8
    What are the various concepts of java?
    Answer:

    No Discussion on this question yet!

    Please Login First :

    Tags:iGate

    Question :: 9
    How many ways to create object in Java?
    Answer:

    No Discussion on this question yet!

    Please Login First :

    Tags:Virtusa

    Question :: 10
    What is the difference between final variable and constant in Java?
    Answer:

    No Discussion on this question yet!

    Please Login First :

    Tags:Virtusa