Write an infinite loop using do while condition.


import java.util.*;

 

public class Solutions {

   public static void main(String args[]) {

      do {

 

      } while(true);

   }   

}



Share to whatsapp

More Questions from Java Basic Codes Module 0

Searching for an element x in a matrix.


View

Find the maximum & minimum number in an array of integers.

[HINT : Read about Integer.MIN_VALUE & Integer.MAX_VALUE in Java]


View

Take an array of Strings input from the user & find the cumulative (combined) length of all those strings.


View

Write a function that calculates the Greatest Common Divisor of 2 numbers.


View

Write a function that takes in age as input and returns if that person is eligible to vote or not. A person of age > 18 is eligible to vote.


View

Write an infinite loop using do while condition.


View

Write a function that takes in the radius as input and returns the circumference of a circle.


View