Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Interview-Questions Java interview questions and answers
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Abhishek Hack
Java interview questions and answers
3 Answer(s)      3 years and 7 months ago
Posted in : Java Interview Questions


  1. what is garbage collection? What is the process that is responsible for doing that in java?

Ans.Reclaiming the unused memory by the invalid objects. Garbage collector is responsible for this process

2.What kind of thread is the Garbage collector thread?

Ans. It is a daemon thread.

3.What is a daemon thread?

Ans.These are the threads which can run without user intervention. The JVM can exit when there are daemon thread by killing them abruptly.

4.How will you invoke any external process in Java?

Ans. Runtime.getRuntime().exec(?.)

5.What is the basic difference between string and stringbuffer object?

Ans. String is an immutable object. StringBuffer is a mutable object.

6.


Advertisement
View Answers

April 18, 2011 at 2:30 PM


//java program for static member method

public class staticc{

int i;

static int j;

public static void staticMethod(){

System.out.println("you can access a static method this way");

}

public void nonStaticMethod(){

i=100;
j=1000;
System.out.println("Don't try to access a non static method");

}

public static void main(String[] args) { //i=100;

 j=1000;
//nonStaticMethod();
staticMethod();

} }



November 9, 2011 at 5:29 PM


String objects are constants and immutable where as StringBuffer objects are not.StringBuffer Class supports growable and modifiable string where as String class supports constant strings. Strings once created we cant modify them. Any such attempt will lead to the creation of new strings.Where as StingBuffer objects after creation also can be able to delete oo append any characteres to it.String values are resolved at run time where as StringBuffer valuesc are resolved at compile time.So if you know the exact size of the string to be appended it is better to go for String objects.



November 22, 2011 at 9:36 PM


Nice Collections of Java Interview question. It really helpful for beginner as well as developer. Check following link too, It is also having a nice collection on Java interview question...

http://mindstick.com/Interviewer/QuestionPage.aspx?topicid=10&topic=Java

Thanks everyone for your nice collection.



Related Tutorials/Questions & Answers:
Java interview questions and answers
Java interview questions and answers   what is garbage collection? What is the process that is responsible for doing that in java? Ans.Reclaiming... in Java? Ans. Runtime.getRuntime().exec(?.) 5.What is the basic difference
Core Java Interview questions and answers
Core Java Interview questions and answers  ... and answers in one place. These Core Java Interview Questions are supported... the answers. We are constantly trying to provide best Core Java Interview questions. You
Advertisements
Plz give the answers - Java Interview Questions
), is the number itself. Write a JAVA program to find all perfect numbers between 2... information,Examples and tutorials on java visit to : http://www.roseindia.net/java/ Thanks
Interview Questions and Answers
Interview Questions and Answers   ... interview questions and some possible ways to answer them. Please remember... such questions, rather than specific answers. Remember, what you say makes only
interview - Java Interview Questions
interview  kindly guide me some interview questions of Java
Software Questions and Answers
from within Java program. JMS - JMS questions and answers.... Java Interview Questions - Discuss Java Interview Questions here... Hibernate Interview questions and browser the answers. JUNIT - The Junit
hint - Java Interview Questions
of interview questions and their answers. Thanks  thanks for your...hint  Dear roseindia, i want the java interview question and the corresponding question answers.   Hi Friend, Please visit
java - Java Interview Questions
Helpful Java Interview questions   Need Helpful Java Interview questions
java questions - Java Interview Questions
java questions  HI ALL , how are all of u?? Plz send me the paths of java core questions and answers pdfs or interview questions pdfs or ebooks :) please favor me best books of interviews questions for craking
Software Questions and Answers
the answers of the questions asked. JavaMail - Java API to send... questions here. Java Interview Questions - Discuss Java... Questions - Ask Hibernate Interview questions and browser the answers
interview questions - Java Interview Questions
interview questions for Java  Hi Any one can u please post the interview point of questions.Warm Regards, Satish
Common Interview Questions and Their Answers.
Common Interview Questions and Their Answers.... The questions and answers given here should act more as indicators, rather... for successful interviews is to remember how you feel. Yes, it is your nth interview
Java Interview Questions
Java Interview Questions  Hi, Can anyone tell the urls of Java Interview Questions on roseindia.net? Thanks
Struts - Java Interview Questions
Struts Interview Questions  I need Java Struts Interview Questions and examples
Questions and Answers Help
Questions and Answers Help      ...://www.roseindia.net/answers/viewqa/Java-Beginners/11976-Java-Hello-World-code-example.html Ask Questions | Browse Latest Questions and Answers
Questions and Answers Help
Questions and Answers Help      ...://www.roseindia.net/answers/viewqa/Java-Beginners/11976-Java-Hello-World-code-example.html Ask Questions | Browse Latest Questions and Answers
java interview question and answer - Java Interview Questions
java interview question and answer   sir, i want one mark java interview question and answers
help me - Java Interview Questions
interview questions java pdf   Do you have any PDF for Java Interview questions
java interview - JSP-Interview Questions
java interview  what type of questions would be asked to a 3 years experience person in java? can anyone please provide list of topics or interview questions for 3 years experience in java
jvm - Java Interview Questions
jvm  Can you provide some JVM Questions for Java Interview preparation
Java Answers
Java Answers  How to Dispaly databsae records in my jsp page using collections Java Class   Visit Here
Java Answers
Java Answers  How to Dispaly databsae records in my jsp page using collections Java Class   Visit Here
java - Java Interview Questions
Java interview questions and answers for freshers  Please provide me the link of Java interview questions and answers for freshers  Hi friend,class Point{ int x, y; Point(){ System.out.println("default"
Java Answers
Java Answers  How to Dispaly databsae records in my jsp page using collections Java Class   Visit Here   For getting records from database to java collections you want to do following steps. 1.Declare
Java Answers
Java Answers  How to Dispaly databsae records in my jsp page using collections Java Class   1)BeanServlet.java: import java.io....){ } } } 2)beandata.jsp: <%@page language="java" import="java.util.*" %> <
Interview Question - Java Interview Questions
Interview Question  I need Interview Questions on Java,J2EE Pls help me
java - Java Interview Questions
Java Development  I need a Job in Java Development..so preparing for it. Can anyone please guide me how to prepare and what are the common questions that can be asked at interview
Java - Java Interview Questions
Java  Questions on Java
JAVA - Java Interview Questions
JAVA  i need objective Questions and answers ( with 4 or 5 choice) in JAVA. Can anyone help me?   H1!! pl. mail your email id to asciimails@gmail.com. I will send you within 2-3 days. Krishna
java - Java Interview Questions
/interviewquestions/ Here you will get lot of interview questions...java  hello sir this is suraj .i wanna ask u regarding interview questins in java .wat normally v see in interviews (tech apptitude)is one line
java - Servlet Interview Questions
java  servlet interview questions  Hi friend, For Servlet interview Questions visit to : http://www.roseindia.net/interviewquestions/servlet/ Thanks
Advertisements
 

 

 

DMCA.com