package tophCoding;
import javax.swing.JOptionPane;
public class DoWhileDiscussion {
public static void main(String[] args) {
String myString = ("This is my string.");
String secondString = ("This is my second string.");
String thirdString = ("This is my third string.");
int x = (9);
int y = (5);
int z = (1);
while (y <6) {
JOptionPane.showMessageDialog(null, secondString);
y++;
}
do {
JOptionPane.showMessageDialog(null, secondString);
y++;
}
while (y < 6);
for(int y1 = 5; y1<6; y1= y1+1) {
JOptionPane.showMessageDialog(null, secondString);
}
do {
JOptionPane.showMessageDialog(null, myString);
x++;
}
while (x < 10);
while (x<11) {
x++;
JOptionPane.showMessageDialog(null, myString);
}
for (int x1 = 9; x1<10; x1= x1+1) {
JOptionPane.showMessageDialog(null, myString);
}
for (int z1 = 1; z1<2; z1 = z+1) {
JOptionPane.showMessageDialog(null, thirdString);
}
do {
JOptionPane.showMessageDialog(null, thirdString);
z++;
}
while (z<2);
while (z<3) {
JOptionPane.showMessageDialog(null, thirdString);
z++;
}
}
}