hello all

what is the meaning of :


I just try to print a variable but the result is

thank you

The is the String returned by the default toString() method. If you want to see something from the Value class add an override to the toString() method to the class and return the string that you want to see.

commented: learned something new :) +9

Hi NormR1 and all
thank for your fast response

here is the code

package c06;
class Value {
  int i = 1;
  public void print() {

public class FinalData1 {
  Value v1 = new Value();
  final Value v2 = new Value();
  static final Value v3 = new Value();
  public void print(String id) {
      id + ": " + "v1 = " + v1 +", v2 = " + v2 + ", v3 = " + v3);
  public static void main(String[] args) {
    FinalData1 fd1 = new FinalData1();

and what is the meaning of
fd1.v2.i++; at the main ?

thank you

that means that you will augment the value of the i variable in your v2 in your fd1 after executing that line.

Add 1 to the value of the variable "i" in the object "v2" in the object "fd1"
That's why choosing good variable names is an essential skill; finding the shortest way to code something isn't.

Hi NormRI,JamesCheriil and stultuske
thank you for your expalination