Computer Science, asked by bhavnapanda0401, 10 months ago

I
IC
ICS
ICSE
How can we print this pattern in java?

Answers

Answered by niishaa
18

Answer:

Answer:

public class Pattern

{

public static void main( )

String st="ICSE";

for(int i=0;i<st.length( );i++)

{

for(int j=0;j<=i;j++)

{

System.out.print(st.charAt(j));

}

System.out.println( );

}

}

}

Answered by dikshaagarwal4442
5

Answer:

// Java program for printing ICSE pattern

import java.util.Scanner;

void main() {

String str = "ICSE";

for (int i = 0; i <str.length(); i++) {

         for (int j = 0; j <= i; j++) {

           System.out.print(str.charAt(j) + " ");

         }

         System.out.println();

    }

}

Explanation:

Among the most utilized and well-liked programming languages is Java.

  • For many years, Java has been one of the most widely used programming languages.
  • Java follows object orientation. Since it supports primitive data types, it is not regarded as being entirely object-oriented (like int, char, etc)
  • First, byte code is created from the Java source codes (machine-independent code). Then, regardless of the underlying architecture, the byte code executes on the Java Virtual Machine (JVM).
  • C/C++ and Java have comparable syntax. Java, however, does not offer low-level programming features like pointers. Additionally, classes and objects are always used while writing Java code.

To learn more about Java, click on the link below:

https://brainly.in/question/15262300

To learn more about Java Virtual Machine (JVM), click on the link below:

https://brainly.in/question/9031864

#SPJ2

Similar questions