Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package wyswietlacz;
- public class Wyswietlacz {
- void wypisz(String komunikat, boolean jestWazny) {
- if (!jestWazny) {
- System.out.println(komunikat);
- } else {
- System.out.println(komunikat.toUpperCase());
- }
- }
- void wypisz(String komunikat) {
- //System.out.println(komunikat);
- wypisz(komunikat,false);
- }
- public static void main(String[] args) {
- Wyswietlacz w1 = new Wyswietlacz();
- w1.wypisz("Ala ma kota");
- w1.wypisz("Ala ma chomika", true);
- w1.wypisz("Ala ma psa", false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement