Advertisement
arxeiss

Class example

Nov 18th, 2016
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.21 KB | None | 0 0
  1. class A {
  2.     private int a;
  3.  
  4.     public A(int a){
  5.         this.a = a;
  6.     }
  7. }
  8.  
  9. class B extends A {
  10.    
  11.     public B(... cokoli){
  12.         // zde nevolám konstruktor předka
  13.         ... cokoli
  14.     }
  15. }
  16.  
  17. B b = new B("ahoj", 1256, false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement