Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //import java.util.*;
- package javaapplication2;
- public class JavaApplication2 {
- /**
- * @param args the command line arguments
- */
- int iloscArgumentow;
- String[] args;
- public static void main(String[] args) {
- JavaApplication2 app =new JavaApplication2(args);
- app.wyswietlParametry(args);
- app.przypisanie(args);
- }
- JavaApplication2(String[] args){
- iloscArgumentow = args.length;
- System.out.println(iloscArgumentow);
- }
- void wyswietlString(String arg){
- System.out.println(arg);
- }
- void wyswietlParametry(String[] args){
- for(int i=0; i<iloscArgumentow;i++){
- wyswietlString(args[i]);
- }
- }
- void przypisanie(String[] args){
- String[] tablicaStringow =new String[5];
- for(int i=0; i<iloscArgumentow;i++){
- tablicaStringow[i]=args[i];
- }
- }
- }
Add Comment
Please, Sign In to add comment