Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Cas {
- public static void main(String[] args) {
- Shape shape = new Shape();
- shape.print(2);
- shape.print();
- }
- }
- class Shape {
- void print() {
- System.out.println("printing without arguments");
- }
- void print(int x) {
- System.out.println("Printing with arguments");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement