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 == true) {
- System.out.println(komunikat.toUpperCase());
- } else {
- System.out.println(komunikat);
- }
- }
- void wypisz(String komunikat) {
- wypisz(komunikat, false);
- }
- public static void main(String[] args) {
- Wyswietlacz w1 = new Wyswietlacz();
- w1.wypisz("ala ma kota", true);
- w1.wypisz("komunikat", false);
- w1.wypisz("pamparampam");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement