ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
 Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related       
Suggest New Category 
 


 

View Page with Answers
  Question  Asked @ Answers Views     select
 
what is an anonymous class? TCS  5  1254
what is polymorphism with example?types of polymorphism? HP  6  5001
what is finalmethod & final variable with example? HP  2  931
what is difference between method overloading & method overridding with example? IBM  2  1158
how to handle exceptions in ejb? Satyam  0  62
can we create object for static class in java Marlabs   5  3257
how to deploy apache tomcat server to weblogic server in java IBM  0  148
how to handled exceptions & erros in ejb? Satyam  1  487
What is difference between static method and static variable?  6  1967
what is difference between front controller and action servlet?  2  967
what is web.xml?and its use? CTS  6  1234
what is struts-config-xml?and its use?  3  1054
what is difference between global methods and local methods?  1  96
how to deploy tomcatserver to weblogic server? write d following steps?  0  74
what is business objects?  1  243
E-Mail New Answers        Answer Selected Questions        Post New Core Java Question
 
Prev    1   ... 7   ... 13   ... 19    29   [30]    31  ... 37   ... 43   ... 49   ... 55   ... 61   ... 67   ... 73   ... 79    Next
 
 
 Core Java interview questions   Core Java Interview Questions  Advanced Java interview questions   Advanced Java Interview Questions  Swing interview questions   Swing Interview Questions
 EJB interview questions   EJB Interview Questions  Servlets interview questions   Servlets Interview Questions  Struts interview questions   Struts Interview Questions
 JDBC interview questions   JDBC Interview Questions  JMS interview questions   JMS Interview Questions  SunOne interview questions   SunOne Interview Questions
 J2EE interview questions   J2EE Interview Questions  Weblogic interview questions   Weblogic Interview Questions  Websphere interview questions   Websphere Interview Questions
 Java Networking interview questions   Java Networking Interview Questions  Java J2EE AllOther interview questions   Java J2EE AllOther Interview Questions
 
 
 
Un-Answered Questions
 
 Question Views Asked at   Select
 
What is inner class?what is the use of inner class?where we create the object for inner class? and inner class can extend any class or inner class can implement any interface? 53  
What is the difference between JDBC 1.0 and JDBC 2.0? 76 Corent-Technology
What are advantages of using Java?s layout managers than windowing systems? 225  
What is procedure overloading? 201  
where the static methods will live ,on stack ? can you explain brefly 115  
what is servlet enginee? 98 Covansys
how to handle exceptions in ejb? 88 HCL
how to run ecllipse with jettyserver for windows environment using batch file 96  
4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. ( 19  
Which of the following is not an isolation level in the JDBC 88 CTS
What is clipping and repainting and what is the relation between them? 430  
what is the use of bean managed and container managed with example? 69 EDS
what is meant by multicast? 145  
Say you want to store the information about a number of pets in an array. Typical information that you could store for each pet (where relevant) would be • Breed of animal • Animal's name • Its birth date • Its sex • Whether it has been sterilised or not • When it is due for its next inoculation • When it last had its wings clipped For each type of pet (eg. dog, cat or bird) you would typically define a class to hold the relevant data. Note: You do not need to implement these classes. Just answer the following questions. 3.1.1 What would be the advantage of creating a superclass (eg. Pet) and declaring an array of Pet objects over simply using an array of Objects, storing each of the instances of the different pet classes (eg. Dog, Cat or Bird) in it? 3.1.2 Would you define Pet as a class or as an interface? Why? (2) (2) 18  
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea 75  
How to display names of all components in a Container? 225 Wipro
Can we call virtual funciton in a constructor ? 119  
My interview asked what is dynamic variable in java and where we use them. 23 IBM
Question 7 [8] Consider the following class and answer the questions below it: public class StackWithGuard extends Stack { public StackWithGuard(int size) { super(size); } synchronized public boolean isEmpty() { return super.isEmpty(); } synchronized public boolean isFull() { return super.isFull(); } synchronized public int getSize() { return super.getSize(); } synchronized public void push(Object obj) { try { while (isFull()) { wait(); } } catch (InterruptedException e) {} super.push(obj); COS2144/102 11 notify(); } synchronized public Object pop() { try { while (isEmpty()) { wait(); } } catch (InterruptedException e) {} Object result = super.pop(); notify(); return result; } public static void main(String args[]) { StackWithGuard stack = new StackWithGuard(5); new Producer(stack, 15).start(); new Consumer(stack, 15).start(); } } Note: The Stack class is provided in the Appendix. Note also: The following questions all refer to the pop() method of the StackWithGuard class given above. 7.1 What does the synchronized keyword ensure for this method? (2) 7.2 Why is a while loop used to test whether the stack is empty? In other words, why wouldn't the following if statement be sufficient? if (isEmpty()) { wait(); } (2) 7.3 Why is the result of popping (provided by the inherited pop() method) stored in a temporary variable? In other words, why wouldn't the following statement be sufficient? return super.pop(); (2) 7.4 Why is the while loop placed in a try-catch structure? (2) Appendix The LinkedQueue class: public class LinkedQueue implements Queue { private Node first, last; private int count; public LinkedQueue() { first = last = null; count =0; } public int size() { return count; } public boolean isEmpty() { return (count == 0); 12 } public void enqueue(Object o) { Node node = new Node(); node.element = o; node.next = null; node.prev = last; if (last != null){ last.next = node; } else { last = first = node; } last = node; count++; } public void dequeue() { if ((first!= null) & (first.next!=null)) { first = first.next; first.prev = null; count--; } else { first = last = null; count--; } } public Object front() { return first; } } class Node { Object element; Node next, prev; } The Stack class: public class Stack { protected Object rep[]; protected int top = -1; protected int size = 0; protected int count = 0; public Stack(int size) { if (size > 0) { this.size = size; rep = new Object[size]; } } public boolean isFull() { return (count == size); } public boolean isEmpty() { return (count == 0); } public int getSize() { return size; } public void push(Object e) { if (e != null && !isFull()) { COS2144/102 13 top++; rep[top] = e; count ++; } } public Object pop() { Object result = null; if (!isEmpty()) { result = rep[top]; top--; count--; } return result; } } 27  
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006. 2334 EDS
E-Mail New Answers        Answer Selected Questions
 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com