Advertisement
Guest User

Untitled

a guest
Sep 16th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. public class Channels {
  2.     private String name[] =  new String[11];
  3.  
  4.     public  Channels[] tvp = new Channels[11];
  5.  
  6.     public void setName(String name, int n){ this.name[n] = name; }
  7.  
  8.     public String getName(int n){ return tvp[n].name[n]; }
  9.  
  10.  
  11.  
  12.     ////////////////////////////////////////////////////////////////////////
  13.  
  14.     public void obiects(){
  15.         for (int i=0;i<11; i++)
  16.         tvp[i] = new Channels(); //mozna osobna pentle
  17.     }
  18.  
  19.     public void nameset(){
  20.         for (int i=2;i<11; i++){
  21.             tvp[i].setName("TVP" + (i-1), i);
  22.         }
  23.         tvp[0].setName("OFF", 1);
  24.         tvp[1].setName("ON",2);
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement