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  >>  Java Related       
 
  Java J2EE (2272)   J2ME (102)   Java Related AllOther (32)
 
Suggest New Category 
 


 

View Page with Answers
  Question  Asked @ Answers Views     select
 
What is Introspection?  2  1159
What is Bootstrapping in RMI?  1  628
What invokes a thread?s run() method?  2  919
What happens when we invoke a thread?s interrupt method while it is in sleeping or waiting condition?  1  225
What will happens, when a thread cannot acquire a lock on an object?  2  717
What exceptions are thrown by RMI?  1  633
What class is used to create Server side object ?  0  141
Name the class that is used to bind the server object with RMI Registry?  0  157
What are the various thread priorities?  1  522
What are the ways to define classes that can be run as threads? KPIT  1  1170
What are the thread-to-thread communcation?  1  307
What are the states associated in the thread?  2  672
What are the services in RMI ?  0  164
What are the high-level thread states?  1  164
What are the advanatages of RMI ?  0  141
E-Mail New Answers        Answer Selected Questions       
 
Prev    1   ... 12   ... 23   ... 34   ... 45   ... 56   ... 67   ... 78   ... 89   ... 100   ... 111    121   [122]    123  ... 133   ... 144   ... 155    Next
 
 
 Programming Languages interview questions   Programming Languages Interview Questions  Scripts interview questions   Scripts Interview Questions  Networking interview questions   Networking Interview Questions
 Microsoft Related interview questions   Microsoft Related Interview Questions  Databases interview questions   Databases Interview Questions  Operating Systems interview questions   Operating Systems Interview Questions
 Testing interview questions   Testing Interview Questions  Servers interview questions   Servers Interview Questions  MainFrame interview questions   MainFrame Interview Questions
 Java Related interview questions   Java Related Interview Questions  Middleware interview questions   Middleware Interview Questions  Web Related interview questions   Web Related Interview Questions
 Data Warehouse interview questions   Data Warehouse Interview Questions  HR Questions interview questions   HR Questions Interview Questions  Software Design interview questions   Software Design Interview Questions
 Debugging interview questions   Debugging Interview Questions  Version Control interview questions   Version Control Interview Questions  Editors interview questions   Editors Interview Questions
 Telecom interview questions   Telecom Interview Questions  ERP CRM interview questions   ERP CRM Interview Questions  Embedded Systems interview questions   Embedded Systems Interview Questions
 Client Server interview questions   Client Server Interview Questions  Artificial Intelligence interview questions   Artificial Intelligence Interview Questions  Cryptography interview questions   Cryptography Interview Questions
 EAI interview questions   EAI Interview Questions  Multimedia interview questions   Multimedia Interview Questions  Software Development Life Cycle interview questions   Software Development Life Cycle Interview Questions
 Image Processing interview questions   Image Processing Interview Questions
 
 
 
Un-Answered Questions
 
 Question Views Asked at   Select
 
can u draw class/object diagram for ATM 605 Zycus-Infotech
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  
how i secure my site with the https protocol.what are the steps? 96  
what is meant by JRMP? 191  
For ease of programming you can consider the maze as a 2D array with colors represented by below integer and characters (in capital letters). • B - Black • W -White • G- Green • R- Red R B W B W W W W W W B W B B W W W W W W W B W B W W W B W W W W B B W W W B W W W B W W B B B B W B W B W W B W W W B W W W B B B W W B W W W B W W B W B W W W B W B W W W W B B W W W W B W W W W W G Shortest Route Problem: • Solution that finds the shortest Route between Red and Green  White will have 1 Weight.  Red and Green carry no weights.  Shortest path is the path with less weight when you add up the weights in the path. 86  
What is Normalization? 135  
How to explain Software Bank Loan descriptions 181 Wipro
How to print nodes of a Binary tree? 210  
we use MainFrame and using os390 for operating system with DB2 data base in IRAN and interest programing with java and use webspere for world wide,please help me where i should start? 100 IBM
how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session. 208  
Describe activation process? 152  
What is correlated subquery? 226 emc2
What is RPC? 143  
What is the use of TL? 67  
Describe responsibilities of Activator? 139  
What are the conditions applies to varchar variable, when using in procedures? 146  
os is developed in c no java is more secured then c na why dont the os developed is developed using java 660  
TX operation funtion executed by? 563 Satyam
Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain 21  
Question 5 [15] Consider the following classes, illustrating the Strategy design pattern: import java.awt.*; abstract class Text { protected TextApplet tA; protected Text(TextApplet tApplet) { tA = tApplet; } abstract public void draw(Graphics g); } class PlainText extends Text { protected PlainText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Sans-serif", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } class CodeText extends Text { protected CodeText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Monospaced", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } public class TextApplet extends java.applet.Applet { protected Text text; protected String textVal; protected Color color; public String getText() { return textVal; } public Color getColor() { return color; } public void init() { textVal = getParameter("text"); String textStyle = getParameter("style"); String textColor = getParameter("color"); if (textStyle == "code") text = new CodeText(this); else text = new PlainText(this); if (textColor == "red") color = Color.RED; else if (textColor == "blue") color = Color.BLUE; else color = Color.BLACK; } public void paint(Graphics g) { text.draw(g); 10 } } The Text class is more complicated than it should be (there is too much coupling between the Text and TextApplet classes). By getting rid of the reference to a TextApplet object in the Text class and setting the colour in the paint() method, one could turn the Text class into an interface and simplify the strategy classes considerably. 5.1 Rewrite the Text and PlainText classes to do what is described above. (6) 5.2 Explain the consequent changes that are necessary to the TextApplet class. (4) 5.3 Write an additional strategy class called FancyText (to go with your simplified strategy classes) to allow fancy text to be displayed for the value "fancy" provided for the style parameter. It should use the font Font ("Serif", Font.ITALIC, 12). (3) 5.4 Explain what changes are necessary to the TextApplet class for this. (2) 21  
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