From c94541d2d3bf17c45732eef021a45d7d2bccfa78 Mon Sep 17 00:00:00 2001 From: Le Phan Date: Sun, 21 Oct 2018 09:56:34 -0500 Subject: [PATCH] Added a 'More Information' with Java Doc links (#19619) --- guide/english/java/classes-and-objects/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guide/english/java/classes-and-objects/index.md b/guide/english/java/classes-and-objects/index.md index 81d75eee4f..45cc55a42e 100644 --- a/guide/english/java/classes-and-objects/index.md +++ b/guide/english/java/classes-and-objects/index.md @@ -82,3 +82,7 @@ System.out.println("Full Car Model X= " + modelX.getManufacturerName() + " : " + So, `Car` is a class, which has the fields or properties `name` and `manufacturerName`. `modelS` is an object of `Car` class. So `modelS` also has the same properties and methods. It is pretty much standard to ensure the object's 'information', in this case the `name` an `manufacturerName` variables, to be private and only be accessed via these getters and setters. This prevents an issue with debugging code that involves an object's member variables. If the member variables were made public, and for whatever reason the program crashes, you could get a rather complex stack trace that may be difficult to point out the error. Keeping the variables private, and only accessible via getters and setters, will simplify this error message down. + +### More Information: +- [Oracle Java Docs :Classes](https://docs.oracle.com/javase/tutorial/java/javaOO/classes.html) +- [Oracle Java Docs :Objects](https://docs.oracle.com/javase/tutorial/java/javaOO/objects.html)