class name refactor

This commit is contained in:
mherbaghinyan 2018-05-17 21:03:00 +04:00
parent 027f011e67
commit 969f40da6e
3 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
package com.baeldung.keyword;
import com.baeldung.keyword.superkeyword.SubClass;
import com.baeldung.keyword.superkeyword.SuperSub;
import com.baeldung.keyword.thiskeyword.ThisKeyword;
/**
@ -11,6 +11,6 @@ public class KeywordDemo {
public static void main(String[] args) {
ThisKeyword keyword = new ThisKeyword();
SubClass child = new SubClass("message from the child class");
SuperSub child = new SuperSub("message from the child class");
}
}

View File

@ -3,14 +3,14 @@ package com.baeldung.keyword.superkeyword;
/**
* Created by Gebruiker on 5/14/2018.
*/
public class SuperKeyword {
public class SuperBase {
String message = "super class";
public SuperKeyword() {
public SuperBase() {
}
public SuperKeyword(String message) {
public SuperBase(String message) {
this.message = message;
}

View File

@ -3,15 +3,15 @@ package com.baeldung.keyword.superkeyword;
/**
* Created by Gebruiker on 5/15/2018.
*/
public class SubClass extends SuperKeyword {
public class SuperSub extends SuperBase {
String message = "child class";
public SubClass(String message) {
public SuperSub(String message) {
super(message);
}
public SubClass() {
public SuperSub() {
super.printMessage();
printMessage();
}