Pages

Friday, 27 December 2019

Java 8 Date Time API

Why did Java 8 introduce a new date and time API when it already had classes such as Date and Calendar? Below are the main reasons 1.Bad API design. For example, The Date class has both date and time components, if you...

Read More

Saturday, 14 December 2019

Collection

Collection

The collection framework is very important for fresher and experienced developers. You must have a good hold on it if you want to crack java interviews. You are supposed to prepare theoretical, coding and scenario-based questions related to this topic. I will...

Read More

Tuesday, 22 October 2019

Dependency Injection

What is Dependency Injection aka Inversion of control? Let's understand first "coupling". When one class depends on another, they are called coupled. Coupled class can't be tested in isolation. For example: Client depends on  BookService, BookService depends on BookDAO, BookDAO depends on...

Read More

Sunday, 6 October 2019

Expectations

The expectation from Core a Java Developer General General expectation of client from core java developer is he should strong in Data structure , multithreading and fundamental , client expect when complex question asked from candidate he should attempt and try to...

Read More

Java 8 features

Agenda Lambda Expression Functional Interface Default Method Inbuilt functional interfaces               1.Consumer               2.Supplier               3.Function               4.Predicate Double colon operator(::) Stream...

Read More

Saturday, 5 October 2019

Wrapper classes

Wrapper classes

Agenda Wrapper classes The class hierarchy of wrapper class Creating an object of the wrapper classes Wrapper classes The wrapper classes are used to wrap primitives in an object. So, they can be added to a collection object. To define utility functions...

Read More

Sunday, 22 September 2019

Optional

Q.What is the alternative to null in Java? Java 8 introduces a new class called java.util.Optional<T> that’s inspired by the ideas of Haskell and Scala. It’s a class that encapsulates an optional value. Q.How do you model the absence of a value?...

Read More

Saturday, 21 September 2019

Double colon operator

Method and Constructor reference by using "::" operator The functional interface method can be mapped to our specified method by using "::" operator. This is called method reference. Our specified method can be either a static or instance method. The functional interface...

Read More

Java 8 in built functions

IN BUILT FUNCTIONS Consumer,Supplier,Function and Predicate all are available under java.util.function package. Comparison  of in built functions Properties Consumer Supplier Function Predicate Purpose To consume some input and perform required operation.It won’t return anything To supply some value base on requirement To...

Read More

Friday, 20 September 2019

Default method

Default Methods In Java 1.8v onwards, you can also define the default method inside the interface. You can define the default method using the keyword default. Default methods are by default available to all implementation classes. Based on our business requirement implementation...

Read More

Tuesday, 17 September 2019

Generic concept

Generic concept

Agenda Introduction Generic Classes Bounded types Generic methods and wild card character Conclusion Introduction The generic concept is introduced in Java 1.5v To resolve two problems of collection. Type safety ClassCastException ArrayList list = new ArrayList();//Non generic a.k.a raw type version till...

Read More
Page 1 of 5123»