Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package tablice;
- /**
- *
- * @author uczen
- */
- public class Tablice {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- /*
- Deklaracja
- typ [] nazwa=new typ[rozmiarTablicy];
- legenda: rozmar tablicy- liczba komórek w tablicy
- */
- String []tksywki=new String[5];
- char []tznaki=new char[4];
- double []tkasa= new double[15];
- int [] trozmiar= new int[16];
- //Samochod []tsamochod=new Samochod[2];
- //Dodawanie danych do talicy
- tksywki[0]="siwy";
- tksywki[2]="dziura";
- tksywki[3]="agadul";
- //tksywki[1]="świniak";
- for(int i=0; i<tksywki.length;){
- System.out.println(tksywki[i]);
- }
- trozmiar[0]=43;
- trozmiar[1]=42;
- for(int i=0; i<trozmiar.length; i++){
- System.out.println(trozmiar[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement