Java core class (Type, File)


Download 39.72 Kb.
bet7/12
Sana01.03.2023
Hajmi39.72 Kb.
#1239065
1   2   3   4   5   6   7   8   9   ...   12
Bog'liq
interview questions

JAVA FEATURES


N1. Generics
1. What is Generics in Java? How it works.
2. Bounded vs unbounded wildcards.
3. Rules to write a generic method.
4. Generics and collections.
5. Creating parameterized class/interface using Generics.
6. What is PECS?
2. Varargs
1. What is it? Important points about varargs in java.
2. How do varargs work?
3. Varargs in methods. Overloading varargs methods.
4. Best practice.
3.  Static import
1. What is static import in Java?
2. What advantage (disadvantage) to use static import?
4.  Annotations
1. What is annotation in Java? Why was it added?
2. Java Annotation package overview.
3. Typical use cases overview.
4. Creating annotations step by step. Consumer. Best practice.
5. Which program element can be annotated?
6. Repeating annotations, Meta-annotations.


5. Functional Programming

  • What is a Lambda Expression?

  • What is a Method Reference?

  • What is a functional interface?

  • What is the difference between a normal and functional interface? 

  • Which functional interfaces do you know?

  • In what package they are located?

  • What is a Predicate interface?

  • What is a Supplier  interface?

  • What is a Consumer interface?

  • What is a Function interface?

  • What is Stream?

  • What does it mean that Stream is lazy?

  • What is the difference between Collection and Stream

  • What is Stream Pipelining ?

  • How to make Stream parallel?

  • What are use cases for Stream parallelization?

  • How to create Stream?

  • How to create an endless Stream?

  • Can you convert an array to Stream? 

  • Can you convert a Collection to Stream? 

  • Can you convert Stream to an array? 

  • What are the main types of Stream operations?

  • What is the difference between intermediate and terminal operations?

  • Could you please give some examples of intermediate operations?

  • Could you please give some examples of terminal operations?

  • What is the difference between operations map and flatMap

  • What does the ‘peek' operation do? 

  • What do 'forEach/forEachOrdered operations do?

  • What is the difference between the 'findFirst' and 'findAny' operations? 

  • What are classes inside java.util.stream package?

  • What are classes inside java.util.function package?

  • How to represent streams of primitive valued elements?

  • How to convert a stream of primitive valued elements to a list?

  • How to convert a stream of primitive valued elements to an array?

  • What is Collector? When and how to implement?


  • Download 39.72 Kb.

    Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   12




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling