I'm trying just to print a simple thing that says : Hola hi hello
, but for some reason it is printing what I want but I get some numbers on my output
Sorry if its an easy thing to find or fix but I'm just starting with java so I'm a complete noob.
My files look like:
Example.java
public class Example {
public static void main(String[] args){
Hola ho = new Hola("hola");
System.out.printf("%s hi hello", ho);
}
}
Hola.java
class Hola {
public String name;
public Hola(String name){
this.name = name;
}
}
Output: Hola@7852e922 hi hello%