I have this class in Java:
class Vis{
private char tv;
public Vis(char tv){
this.tv = tv;
}
}
and when I try to initialise this class, I did this:
Vis vv = new Vis('a');
System.out.println(vv);
But what I have is: Vis@74a14482
instead of a
.
Can I ask what have I done wrong? Thanks