Top Java Interview Questions

Fibonocci series Fibonocci Series is one of the basic questions in Java., to check the programmer has a basic understanding of logic implementation in java. In Fibonocci series, the current number is always the sum of previous two numbers. Fibonocci series is initialized with 0 & 1. 0, 1, (0+1)2, (1+2)3, (2+3)5, (3+5)8, (5+8)13….

Top Java Interview Questions Read More »

Configure Log4j2 Converter Plugin -Java (Filter log messages)

Apache Log4j2 is used for printing info, error, debug, trace logging statements in enterprise applications. Inorder to format all the log messages externally before printing in logs, we need to create Filters in Log4j 1.x versions. In Log4j2 , we can use LogEventPatternConverter to filter/convert/format log messages before printing in the log files in server. …

Configure Log4j2 Converter Plugin -Java (Filter log messages) Read More »

Configure Log4j2 -Java in minutes

Apache Log4j2 is used for printing info, error, debug, trace logging statements in enterprise applications. Apache Log4j2.x is an extension of Log4j1.x which has more significant features comparatively.Since major security vulnerabilities like Log4jShell & hacking possibilities are identified in Log4j1.x, it is always recommended to use Log4j2.x. It is pretty simple to configure Log4j2 in …

Configure Log4j2 -Java in minutes Read More »

SimpleDateFormat (Parse Date)

Date conversions are very common scenarios in any application., Java Provides SimpleDateFormat class for String to Date, Date to String conversions. The below example shows How String format can be converted to Date Format. How to find difference between 2 Dates. Code:

Output