Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Enchanter {
- String name = "tim";
- Enchanter () {
- //Nothing needs to be done her
- }
- void sayName() {
- System.out.println(name);
- }
- public static void main (String[] args) {
- System.out.print("*Explosion*, ");
- System.out.print("There are some who call me..., ");
- Enchanter e = new Enchanter();
- System.out.print("*Explosion*");
- e.sayName();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement