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                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
 Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related       
Suggest New Category 
 


 

View Page with Answers
  Question  Asked @ Answers Views     select
 
When you Click a Button, What event will be fired?  2  848
What is the specification of ?CODEBASE? in an applet?  1  650
Realized?  0  138
garbate collector(GC)?  4  892
What classes of exceptions, thrown by a throw statement?  2  991
What are wrapper classes? Noah-Solutions   6  3074
What classes of exceptions, caught by a catch clause?  1  879
Java run-time system generates What class of exceptions? TCS  0  134
What class is used to create Server side object? TCS  0  69
What is the top class of AWT event hierarchy?  5  1014
What are wrapped classes?  6  1645
What are virtual functions?  2  1680
types of applets?. TCS  3  1448
What are types of Java applications?  4  1277
transaction attributes ?  2  791
E-Mail New Answers        Answer Selected Questions        Post New Core Java Question
 
Prev    1   ... 7   ... 13   ... 19   ... 25   ... 31   ... 37   ... 43   ... 49   ... 55    65   [66]    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
 
how to use crystal reports in java 113  
How to solve the problem of generating the unique hash keys with hash function? 63  
what r advatages of websphere? & how to deploy? 79 Saksoft
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; } } 31  
can any one tell me what is advantage of encapsulation 115  
What is files manifesting? 107  
What is procedure overloading? 203  
What is your platform?s default character encoding and how to know this? 186 TCS
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 76  
What is a resource leak ? 129  
What class is used to create Server side object? 69 TCS
how to write a program for sending mails between client and server 99 Lampex
How can we achieve IPC in JAVA? 75  
What is clipping and repainting and what is the relation between them? 430  
How is rounding performed under integer division? 187 Satyam
What is the SimpleTimeZone class? 212  
There is a Banking application. It has 2 types of account, Savings and Current. Write a method calculateInterest by passing an ArrayList of these account objects and calculate Interest accordingly. Write code for this situation 79 KPIT
Tell me the Importent classes in net package? 139  
how to open and edit XML file in Weblogic??? 152 Symphony
How to implement a multithreaded applet? 325  
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