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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
 Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related       
Suggest New Category 
 


 

View Page with Answers
  Question  Asked @ Answers Views     select
 
How do you relate a Interface to a Class? Tell me in Detail?  4  1459
In Serialization, whether you will use Static variables? HCL  2  3224
Which is the best way to use for String concatenation in Java? HCL  5  6099
What is the use join() in Threads ? HCL  4  2935
What is the use of anonymous inner classes ? HCL  8  4085
What is the format of Inner Class after it compiled?  1  1247
What is the life cycle of Thread ? HCL  7  5554
How to set the Heap size in Java ? HCL   2  3021
Is JRE required to compile Java files ? HCL  3  2990
How do you set security in applets? Wipro  1  1694
What are different type of access modifiers?  3  2048
How many ways can an argument be passed to a subroutine?  2  1284
what is an object and how do you allocate memory to it? Wipro   3  2499
what are class,constructor and primitive data types?  2  1123
what is a static block?  4  1691
E-Mail New Answers        Answer Selected Questions        Post New Core Java Question
 
Prev    1   ... 7   ... 13   ... 19   ... 25   ... 31   ... 37    45   [46]    47  ... 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 class is used to create Server side object? 69 TCS
What problems will occur when you don?t use layout managers? 181  
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. ( 20  
What is Unicast and Multicast object? Where we will use? 171  
Realized? 138  
How is rounding performed under integer division? 187 Satyam
Name the components that are termed to be Heavy-weight component but available in Light-weight components? 372  
What is the use of TL? 67  
How to display names of all components in a Container? 226 Wipro
how to deploy tomcatserver to weblogic server? write d following steps? 75  
What is Restrictions in hibernate? 172 Bally-Technologies
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  
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? 56  
What are advantages of using Java?s layout managers than windowing systems? 228  
v-model life cycle 66 Virtusa
if u open login & logout ,how can udisplay the timelogin & logout members ? 81 Virtusa
When do you create an index? 130  
which is advanced deep technology in java launched by the sun microsystem??? The answer is very logical If u need correct answer mail me at priya_gupta@gmail.com 20 IBM
What is stored procedure. How do you create stored procedure ? 71 GE
Tell me the Importent classes in net package? 139  
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