Hello guy’s. here is the post to move array elements into left or right direction. the result can be achieve by loops. we can use any loops like for , for-each,while etc… let’s see the program. Output Screen Code Explanation : step 1 : if you debug/run the program then control goes to main method […]
Tag: java programming
Convert 1D Array to 2D Array in Java
Hello Friends in this article i’m going to explain about the program to Convert 1D Array to 2D Array in Java or Convert 1 Dimension Array into 2 Dimension Array in Java . Convert One Dimension Array into Two Dimension Array in Java. Let’s see the program. Code Explanation : step 1 : if you […]
5 Ways to Concatenate Strings in Java
different ways to concatenate strings in core java programming. various ways to concatenate strings in java language. 1. String Concatenation using + operator import java.util.*; public class First { public static void main(String[] args) { System.out.print(“Hello” + ” ” + “World ” + “!!!!”); } } 2. By declaring strings import java.util.*; public class First […]
Core Java Interview Questions and Answers
Hello Friends,In this article i have written lots of java Interview Questions for Fresher and experienced people. Example 1 : What is the output of following program Correct Answer A.Code Explanation : step 1 : if you debug/run the program then control goes to main method thereafter that go inside of the main.step 2 : […]
Java Program to check Even or Odd number
Java program to check if a number is odd or even. if a number is divisible by two then it is even. if a number is not divisible by two then it is odd.we use modulus ( %) operator to check even or odd numbers.modulus operator return remainder value. Java Program to check Even or […]
Fibonacci Series Program in Java
The definition of Fibonacci Series, next number is the sum of previous two numbers. the first two numbers of the Fibonacci series 0 , 1 The Fibonacci Sequence : 0, 1, 1,2 ,3, 5, 8, 13, 21, … Fibonacci Series Program in Java using For Loop Example 1 Fibonacci Series Program in Java using For […]
Java Program to Swap Two Numbers with/without Third Variable
Swapping Two Numbers in Java Hi Friends, In this article, i have written two methods to swap two numbers using java. swap two numbers without third variable swap two numbers with third variable Swapping Two Numbers in Java with third variable Swapping Two Numbers in Java without third variable Happy Coding…Thanks.
Check Number Integer or Float in Java
How to Check Number is Integer or Float in Java. Suppose if user enter number 19 then output will display , “Number is Integer”. Suppose if user enter number 18.89 then output display , “number is float/double”. the number has decimal point that number is either float or double.You should try these two following codes… […]
Java Program to Convert Number to Words
The above program to Convert any number to words in Java programming suppose if user enter number 2 , output : two. you should try the above codes it works correctly. If any doubts , leave your comments. Happy coding ,, thanks.
Java Program to Move All Zeros to End of an Array
Hi Friend’s, Welcome to new blog of Java languageTutorial . Here, the post about to Move All Zeros to End of an Array in Java Language. Suppose if User enter {5,7,0,8,0,4} then output should be come {5,7,8,4,0,0}. For code explanation , you should follow below video tutorial. Happy Coding, Thanks…