Using the knowledge in computational language in JAVA it is possible to write a code that code segments could replace the while loop without changing the resulting value of total.
import java.io.*; //Code Segment I
public class Main
{
public static void main(String[] args)
{
for (int i = 0; i < 10; i++)
{
System.out.print( "*" );
}
}
}
import java.io.*;
public class Main
{
public static void main(String[] args)
{
for (int i = 1; i <= 10; i++)
{
System.out.print( "*" );
}
}
}
See more about JAVA at brainly.com/question/12975450
#SPJ1