Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Aug 1, 2024

Java Basic Interview Questions for Freshers

Java Basic Interview Questions for Freshers, programming interview questions, basic java interview questionsIn this post, we will explore some of the most frequently asked basic Java interview questions. It contains interview questions from different Java topics like strings, threads, servlets, OOPs etc. These questions are easy to answer and it will also enhance your confidence and help you ace your Java interviews.


Java Program to Check Given Number is Even or Odd

In this post, we are going to see two ways to print whether a given number is even or odd in Java. First one is using if-else statements, and another one without using if-else statements, using the ternary operator in Java. So, let's dive into the discussion of how to check whether a given number is even or odd.


Step by Step logic of the given Program:

  1. First Create a Scanner class object to accept input from user.
  2. Accept input from user and store that in variable called num.

Featured Post

Java Interview Questions for 2 to 5 Years Experience

In this post, we are going to cover the most frequently asked Java interview questions for a 2 to 5 years experienced Java developer. It con...