Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Main {
- public static void main(String[] args) {
- Printer myPrinter = new Printer();
- myPrinter.print("Hello");
- }
- }
- class Printer {
- public void print(String text) {
- System.out.println(text);
- }
- }
- // Niciuna din clase nu poate sa fie publica deoarece am denumit fisierul Problema3.
- // Intr-un fisier nu pot sa fie 2 clase publice
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement