Category Archives: Java Programs

What are the important paradigms for Developing the Clean Object-Oriented Code?

In this blog post we will discuss about What are the important paradigms for Developing the Clean Object-Oriented Code? We should always keep in mind below key points when you write code in your application: We should use an Interface (or the Super Type) not the implementation. Classes Interacting each other should be loosely coupled among… Read More »

What will be the output of following java program?

In this post we will learn about one of very tricky java programming interview question where interviewer will give you code snippet and you will have to find the output of given code snippet. What will be the output of following java program?

 Answer: The code won’t compile because we can’t have an Object class… Read More »

Adding two numbers without using arithmetic operators

As you know to find sum of to two numbers we usually use arithmetic operator(+) but in this post we will write a java program to Adding two numbers without using arithmetic operators.

Sample output of above program:

You may also like: How to convert number to words in java How to swap… Read More »

What will happen if in a try block we throw an exception but in the finally block we return a int value ?

In this we post we will discuss about one of very important java interview question and question is that What will happen if in a try block we throw an exception but in the finally block we return a int value ?

Output of above program: The return Value : 10 You may also like… Read More »

How to find first non-repeatable character from a String using Java 8 ?

In this post we will learn How to find first non-repeatable character from a String using Java 8?

Sample output of above program:

You may also like : How to convert number to words in java How to swap two numbers with or without temporary variable in java How to reverse a number… Read More »

How will you find Word Frequency in a collection of words?

In this post we will learn How will you find Word Frequency in a collection of words java program with example.

 Output of Above Program:

You may also like- Check if two strings are anagrams or not in java How to convert string to int without using library functions in java Check Whether a… Read More »

Fibonacci series using iterative and recursive approach java program

Hey Guys in this post we will write program for Fibonacci series using iterative and recursive approach. Fibonacci series using iterative approach:

Sample input & output: Enter How many Fibonacci Series you want:: 10 Fibonacci Series:: 0 1 1 2 3 5 8 13 21 34 Fibonacci series using recursive approach:

Sample input &… Read More »