Added comments in the code. modified index.md

This commit is contained in:
JuhoKang
2016-01-29 00:53:27 +09:00
parent 083065ba93
commit d3eb8a2ef2
4 changed files with 48 additions and 10 deletions

View File

@ -1,12 +1,19 @@
package com.iluwatar.value.object;
/**
* Hello world!.
* App Class.
*
*/
public class App {
/**
* main method.
*/
public static void main(String[] args) {
HeroStat stat = HeroStat.valueOf(10, 5, 0);
System.out.println(stat.toString());
HeroStat statA = HeroStat.valueOf(10, 5, 0);
HeroStat statB = HeroStat.valueOf(5, 1, 8);
System.out.println(statA.toString());
// When using Value Objects do not use ==, only compare using equals().
System.out.println("is statA and statB equal : " + statA.equals(statB));
}
}