Square pattern in java

In this article we are going to print square pattern using java code. Example:- if n = 4 Steps:- Take input for row and column from user using scanner Run a loop for rows from i= 1to i<=n. inside first loop run another loop for column from j=1 to j<=n. and print *. After termination … Read more

Program to counts digits in a number

In this article we are going to count digits in a given number Example:- if number is 23455, then the output will be 5. because the total number of digits is 5 in a given number. Steps:- First take input from the user by using a scanner. declare a variable to count the digits. run … Read more

Array input in java

In this article, we are going to see how we can take array input in java using a scanner. What is an Array? Array is the collection of similar data type value. Length of an array is fixed we can’t change length of an array after declaration. Memory allocation in array is contiguous. Array Declaration … Read more