Interview Questions and Answers for 'Ptc' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Ptc' - 3 question(s) found - Order By Newest

Frequently asked in Infosys India
  Q1. What is a String Pool ?Core Java
Ans. String pool (String intern pool) is a special storage area in Java heap. When a string is created and if the string already exists in the pool, the reference of the existing string will be returned, instead of creating a new object and returning its reference.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   oops   string   string class   string pool   heap memory     Asked in 31 Companies      intermediate        frequent

Try 2 Question(s) Test


Related Questions

  Why Char array is preferred over String for storing password?
  What are different ways to create String Object? Explain.
 How does making string as immutable helps with securing information ? How does String Pool pose a security threat ?
 Which memory segment holds String Pool in Java ?
 How and Why Strings are interned in Java ?
 What will be the output of following code

Integer x = 1;
Integer y = 2;
System.out.println(x == y);

What if you change 1 to "1" and Integer to String?
 What will be result of following code and why

Integer int1 = 1;
Integer int2 = 1;
String str1 = new String("str");
String str2 = new String("str");
String str3 = "str";
String str4 = "str";

      
System.out.println(int1 == int2);
System.out.println(str1 == str2);
System.out.println(str3 == str4);
 What is the purpose of String Pool ? Don't you think it's a performance overhead to have unnecessary check for string in string pool ?
 Why string pool concept has been introduced in string ?


Almost sure to be asked in every company using any Dependency Injection framework ( Spring, Guice etc )
  Q2. What is Dependency Injection or IOC ( Inversion of Control ) ?Design
Ans. It is a Design Pattern that facilitates loose coupling by sending the dependency information ( object references of dependent object ) while building the state of the object. Objects are designed in a manner where they receive instances of the objects from other pieces of code, instead of constructing them internally and hence provide better flexibility.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     design patterns   ioc ( Inversion of Control )  dependency injection     Asked in 83 Companies      intermediate        frequent


Related Questions

 What are the benefits of Dependency Injection or IOC ?
 What are different types of dependency injections ?
  Name few Dependency Injection frameworks ?
 Why do we need polymorphism in Java ?
  What are the various Auto Wiring types in Spring ?
  What is the difference betweeen @Inject and @Autowired ?
 Which of the following Java features facilitates Dependency Injection - Inheritance or Composition ?
 What are the different ways in which dependency injection can be done using Spring Framework ?
 Difference between constructor and setter injection ?


 Q3. What are the phases of the JSP life cycle ?Java EE
Ans. Translation of JSP PageCompilation of JSP PageClassloading (class file is loaded by the classloader)Instantiation (Object of the Generated Servlet is created).Initialization ( jspInit() method is invoked by the container).Reqeust processing ( _jspService() method is invoked by the container).Destroy ( jspDestroy() method is invoked by the container).

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     j2ee   servlets   servelets   web application   jsp   jsp life cycle   mindtree     Asked in 9 Companies


Related Questions

  Difference between the jsp scriptlet tag and jsp declaration tag?
  What is a config Object?
  What is a pageContext Object?
  What are JSP directives ? What are different types of directives ?
 What are JSP Scriptlets?
 How can we remove a JSP page from getting cached ?
 Ho do you share / transfer variables between JSP pages ?
 Difference between Include Directive and include action in jsp
 Difference between import and include directive in jsp



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: