Java Play Interview Questions
1) What Is Play Framework?
Play Framework is an open-source, type-safe reactive platform, and high-productivity written in Scala and Java. Play Framework is used to build scalable, fast, and real-time web applications with Java and Scala.
Play was created in May 2007 by software developer Guillaume Bort, while working at Zengularity SA (formerly known as Zenexity). Play is heavily inspired by ASP.NET MVC, Ruby on Rails and Django.
Now Play 2 is fully RESTful - there is no Java EE session per connection. It is also supported by JUnit and Selenium for unit testing.
2) Is Play Framework open-source?
Yes, Play Framework is an open-source and Licensed under the Apache License, Version 2.0.
3) What Is The Advantage Of Play Framework?
The list of Advantages of Play Framework:-
1. Open Source
2. Fully RESTful framework
3. Modern stacks
4. Java and Scala
5. Amazing error handling
6. Reactive
7. Supported
8. Flexible
9. Graphically improved developer productivity
10. A full embedded testing framework and an automatic file uploads functionality
4) Is Play Framework follows MVC pattern?
Yes! Play Framework follows MVC (model–view–controller) architectural pattern.
5) What are new features in Play 2.6?
1. Scala 2.12 support
2. Injectable Twirl Templates
3. Added gzip filter
4. Just as in Scala, Play now has components to enable Java Compile Time Dependency Injection.
5. Play now uses JSON Web Token (JWT) format for session and flash cookies
6. SLF4J Marker support has been added to play.Logger and play.api.Logger
7. Play’s support for futures in asynchronous operations has been improved, using the Futures trait.
8. Updated Templates with Preconfigured CustomExecutionContexts
9. Filters Enhancements
10. Testing Improvements
11. Play JSON improvements
12. File Upload Improvements
6) What Do You Mean By The Java Collection Framework?
Collections are utilized in various programming languages and basic release contained some classes for collections such as Vector, Stack, Hashtable, and Array. But the more scope and uses Java 1.2 came up with collections Framework the collections interfaces, implementations and different type algorithms.
7) What Are The Advantages Of Collections Framework?
Some of the advantages of collections framework are:
-The reduce development effort by using core collection classes rather than defining collection classes.
-The code quality is improved with the use of completely tested collections framework classes.
-Reduce some effort for code maintenance by utilizing collection classes with the JDK.
-Collection framework also provides reusability and Interoperability.
8) What Is The Advantage Of Generic In Collection Framework?
The Java 1.5 came with Generic and more collection interfaces and implementations use it mostly. The Generics provide us the type of object that a collection can obtain, so if you try to understand and add any element of a different type it throws compile time error.
9) What Do You Mean By Iterator In Play Framework?
The iterator interface provides a different technique to iterate over any Collection. So we can easily get iterator instance from a collection utilizing iterator technique. The iterator takes the place of Enumeration in the Java Collection Framework. The iterator also provides the caller to destroy elements from the underlying collection at the time of the iteration.
10) What Do You Mean By Iterator Fail-fast Property?
The Iterator fail-fast property test for any modification in the structure of the underlying collection every time we try to get the next element. If there are any modifications found, by CocurrentModificationException. The complete implementations of Iterator in Collection classes fail-fast by make except for the concurrent collection classes such as ConcurrentHashMap and CopyOnWriteArrayList.
11) What Do You Understand by Unsupportedoperationexception?
The UnsupportedOperationException is the exception; it is used for indicating that the operation is not supported. It is also used extensively in JDK classes, in Collection Framework, java.util.collections.UnmodifiableCollection by this exception for all add or remove operations.
No comments:
Post a Comment