Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Minta2{
- int tomb[] = {10,20,30,40,50};
- public static void main(String args[]) throws Exception{
- Minta2 minta = new Minta2();
- System.out.println("Hello vilag!");
- int j = 0;
- for(int i = 0; i < 5; i++){
- System.out.println(minta.tomb[i]);
- }
- while( j < 5){
- System.out.println(minta.tomb[j]);
- j++;
- }
- //j = 5
- j = 0;
- do{
- System.out.println(minta.tomb[j]);
- j++;
- }while(j < 5);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement