0% found this document useful (0 votes)
33 views

Class Example (Public Static Void Main (String Args ) (Int X For (X 0 X 3 X++) (System - Out.println ("X Is Equalto "+X) ) )

This Java code defines a class called "example" with a main method that initializes an integer variable x to 0. It uses a for loop to iterate x from 0 to less than 3, printing the statement "x is equal to" plus the current value of x on each iteration. The for loop iterates 3 times, printing the value of x on each pass through the loop before terminating.

Uploaded by

Avirup Mullick
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Class Example (Public Static Void Main (String Args ) (Int X For (X 0 X 3 X++) (System - Out.println ("X Is Equalto "+X) ) )

This Java code defines a class called "example" with a main method that initializes an integer variable x to 0. It uses a for loop to iterate x from 0 to less than 3, printing the statement "x is equal to" plus the current value of x on each iteration. The for loop iterates 3 times, printing the value of x on each pass through the loop before terminating.

Uploaded by

Avirup Mullick
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

class example

{
public static void main(String args[])
{
int x;
for(x=0;x<3;x++)
{
System.out.println("x is equalto "+x);
}
}

You might also like