Javascript - Interview Questions and Answers for 'At' - 3 question(s) found - Order By Newest Ans. A cookie is a small piece of text stored on a user's computer by the browser for a specific domain. Commonly used for authentication, storing site preferences, and server session identification. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  cookie   javascript   web application   session management   browser   j2ee Asked in 16 Companies basic   frequent Related Questions What is session tracking and how do you track a user session in servlets? what is the use of cookie and session ? and What is the difference between them ? What are different types of cookies ? Why using cookie to store session info is a better idea than just using session info in the request ? http protocol is by default ... ? How cookies helps by storing encrypted passwords ? Is it front end code or the back end code , that drops the cookies ? How can we drop cookies through back end code ? Does it transfer the cookie file to the client ? What is SameSite cookie attribute ? Q2. What is event handling ? What is event propagation ? JavaScript
Ans. LinkedIn Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  event habdling  event propagation  events Asked in 1 Companies Related Questions What is event bubbling ? Ans. == compares values === is used in scripting languages for comparing two values as well as there data tpe. like in js,php. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  ==  ===  == vs === Asked in 13 Companies basic   frequent Related Questions Q4. How can we create objects if we make the constructor private ? Core Java
a. We can't create objects if constructor is private b. We can only create objects if we follow singleton pattern c. We can only create one object d. We can create new object through static method or static blockAns.d. We can create new object through static method or static block
Q5. What will be the output of executing following class ?
public class BuggyBread {
static {
System.out.println("Static Block");
}
{
System.out.println("Initialization Block");
}
BuggyBread(){
System.out.println("Constructor");
}
public static void main(String[] args){
System.out.println("Main Method");
}
}
Core Java
a. Static Block
Main Method b. Static Block
Instance Initialization Block
Main Method c. Static Block
Constructor
Main Method d. Static Block
Instance Initialization Block
Constructor
Main MethodAns.a. Static Block
Main Method
Q6. What will be the output upon executing following class ?
public class BuggyBread {
static {
System.out.println("Static Block");
}
{
System.out.println("Instance Initialization Block");
}
BuggyBread(){
System.out.println("Constructor");
}
public static void main(String[] args){
System.out.println("Main Method");
new BuggyBread();
}
} Core Java
a. Instance Initialization Block
Constructor
Static Block
Main Method b. Static Block
Instance Initialization Block
Constructor
Main Method c. Main Method
Static Block
Instance Initialization Block
Constructor d. Static Block
Main Method
Instance Initialization Block
ConstructorAns.d. Static Block
Main Method
Instance Initialization Block
Constructor
Q7. With the following code, Which is a valid way to initialize ?
public class BuggyBread {
private String element1;
private String element2;
private BuggyBread(String element1, String element2){
this.element1 = element1;
this.element2 = element2;
}
public static class Builder {
private String element1;
private String element2;
Builder(BuggyBread buggybread){
element1 = buggybread.element1;
element2 = buggybread.element2;
}
Builder withElement1(String element1){
this.element1 = element1;
return this;
}
Builder withElement2(String element2){
this.element2 = element2;
return this;
}
BuggyBread build(){
BuggyBread buggybread = new BuggyBread(element1,element2);
return buggybread;
}
}
} Core Java
a. BuggyBread buggybread = new BuggyBread(); b. BuggyBread buggybread = new BuggyBread("element1","element2"); c. BuggyBread.Builder builder = new BuggyBread.Builder(); d. BuggyBread.Builder builder = new BuggyBread.Builder("element1","element2");Ans.d. BuggyBread.Builder builder = new BuggyBread.Builder("element1","element2");
Q8. What will be the output of following ?
public class BuggyBread {
private int x;
private Integer y;
BuggyBread(int x,int y){};
public static void main(String[] args){
BuggyBread buggybread = new BuggyBread(1,2);
System.out.println(buggybread.x);
System.out.println(buggybread.y);
}
} Reference Core Java
a. 0 0 b. 0 null c. null 0 d. null nullAns.b. 0 null
Q9. Which of the following is true for == operator ? Core Java
a. For primitives, == checks if the variables on left and right have same data type b. For primitives, == checks if the variables on left and right have same value c. For Objects, == checks if the references on left and right have same data type d. For Objects, == checks if the references on left and right have same valueAns.b. For primitives, == checks if the variables on left and right have same value
Q10. Which of the following is equivalent to following logic ?
Not X && Not Y Core Java
a. x || Y b. Not(X || Y) c. Not(X && Y) d. Not X && YAns.b. Not(X || Y)
Q11. Which of the following http response means the resource is not found ? Java EE
a. 500 b. 200 c. 404 d. 400Ans.c. 404
Q12. What is Dirty Read in Database Transactions ? Database
a. Data Read by Transaction 2 which hasn't yet updated by Transaction 1 b. Data Read by Transaction 2 which has been updated and commited by Transaction 1 c. Data Read by Transaction 2 which has been updated but not commited by Transaction 1 d. Inability of Transaction 2 to read Data when Transaction 1 is updating.Ans.c. Data Read by Transaction 2 which has been updated but not commited by Transaction 1
Q13. Which of following annotation is used to initialize objects before executing set of tests ? Reference Junit
a. @Test b. @Ignore c. @After d. @BeforeAns.d. @Before
a. Static members are shared by all objects of the class. b. We can override static methods. c. Static methods operate on static variables only. d. Static Elements are accessed using class name.Ans.b. We can override static methods.
a. Feature to load the dependencies from Cache b. Feature to load all objects and relationships in advance before they can be used c. Feature to not load dependencies and relationship in advance and load when required d. Feature to not load the dependencies and relationships at allAns.c. Feature to not load dependencies and relationship in advance and load when required
Q16. Which of the following is not the benefit of Lazy Initialization in Hibernate ? Hibernate
a. Laod When required provides better performance b. Object stays lighter c. Less number of Database calls d. Less load on DatabaseAns.c. Less number of Database calls
Q17. The use of volatile keyword facilitates .. Core Java
a. Making Use of Cache for better Performance b. Avoiding use of Cache c. Making use of Backward as well as Forward Cache d. Keeping only one copy of variable in CacheAns.b. Avoiding use of Cache
Q18. Static Polymorphic in Java is achieved through .. Core Java
a. Method Overloading b. Method Overriding c. Variable Overloading d. Variable OverridingAns.a. Method Overloading
Q19. Which of following are serialized ? Core Java
a. static variables b. transient variables c. instance variables d. method local variablesAns.c. instance variables
Q20. Which of the following is not true for Hibernate Cache ? Hibernate
a. First level cache is enabled by default b. First level Cache is Session specific c. First level cache is considered global d. First level Cache came with Hibernate 1.0Ans.c. First level cache is considered global
Q21. Which of the following is not an Hibernate Annotation Hibernate
a. @Id b. @JoinTable c. @ManyToMany d. @AutowiredAns.d. @Autowired
Q22. Which of following is not Spring MVC annotation ? Spring
a. @Autowired b. @Controller c. @JoinColumn d. @TransactionalAns.c. @JoinColumn
Q23. In majority of the cases, the following join will give maximum number of results ? Reference Database
a. Inner Join b. Outer Join c. Left Join d. Right JoinAns.b. Outer Join
a. Left Join and Right Join gives equal number of Results b. Outer Join and Inner Join gives equal number of Results c. Inner Join gives maximum number of results records d. Inner Join gives minimum number of result recordsAns.d. Inner Join gives minimum number of result records
Q25. Listeners are example of .. Design
a. Factory design Pattern b. Abstract Factory Design Pattern c. Singleton Design Pattern d. Observer Design PatternAns.d. Observer Design Pattern
Q26. Which of the following is a configuration management tool ? Tool
a. Github b. Jira c. Tomcat d. EclipseAns.a. Github
Q27. Which of following is not a configuration management tool ? Tool
a. SVN b. Jira c. GitHub d. ClearcaseAns.b. Jira
Q28. Which of the following Design pattern has been used with Hibernate Criteria ? Hibernate
a. Filter b. Prototype c. Builder d. ObserverAns.a. Filter
Q29. Which of following is not core interface of Hibernate ? Hibernate
a. Session b. Transaction c. SessionFactory d. TransactionFactoryAns.d. TransactionFactory
Q30. Which of the following is not true for Prepared Statements ? Database
a. Prepared Statements provides better performance b. Prepared Statements prevent SQL Injection attacks c. Prepared Statements provide ORM capabilities d. Prepared Statement provides DB side cachingAns.c. Prepared Statements provide ORM capabilities