0% found this document useful (0 votes)
7 views

Java Fullstack Questions

The document discusses Java concepts like OOPS, Strings, IDEs and filters in Angular. It also covers testing Angular apps, lifecycle hooks and the difference between JPA and Hibernate. Commands to run and stop Spring Boot jars are also provided.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Java Fullstack Questions

The document discusses Java concepts like OOPS, Strings, IDEs and filters in Angular. It also covers testing Angular apps, lifecycle hooks and the difference between JPA and Hibernate. Commands to run and stop Spring Boot jars are also provided.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Questions

1) What is Java?
Java is an object oriented language.
2) Name the Java IDE’s?
Eclipse
3) Name some OOPS Concepts in Java?
Encapsulation, Polymorphism, Inheritence
4) Although inheritance is a popular OOPs concept, it is less advantageous than composition.
Explain.
Easy mocking,
Easy compare using comparator
5) How would you differentiate between a String, StringBuffer, and a StringBuilder?
String is immutable,
StringBuffer is mutable, not a thread safe
String builder is mutable, thread safe.
6) What is the purpose of a filter in Angular?
To filter certain objects with predicate.

7) What are the different types of filters in Angular?

Number Formats a numeric data as text with comma


and fraction.
Currency Formats numeric data into specified

currency format and fraction.


Date Formats date to string in specified
format.
Uppercase Converts string to upper case.

Lowercas Converts string to lower case.


e
Filter Filters an array based on specified
criteria and returns new array.
orderBy Sorts an array based on specified

predicate expression.
Json Converts JavaScript object into JSON
string
limitTo Returns new array containing specified
number of elements from an existing
array.

9) List some tools for testing angular applications?


Karma, Protactor
10 ) What are lifecycle hooks in Angular? Explain a few lifecycle hooks.
 ngOnChanges − When the value of a data bound property changes, then this method is called.
 ngOnInit − This is called whenever the initialization of the directive/component after Angular first displays the
data-bound properties happens.
 ngDoCheck − This is for the detection and to act on changes that Angular can't or won't detect on its own.
 ngAfterContentInit − This is called in response after Angular projects external content into the component's
view.
 ngAfterContentChecked − This is called in response after Angular checks the content projected into the
component.
 ngAfterViewInit − This is called in response after Angular initializes the component's views and child views.
 ngAfterViewChecked − This is called in response after Angular checks the component's views and child
views.
 ngOnDestroy − This is the cleanup phase just before Angular destroys the directive/component.

11) What are the commands to run and stop Spring Boot executable jar file?
server.shutdown=graceful

12 ) What is the main difference between JPA and Hibernate?


JPA is specification, Hibernate is implementation

You might also like