printf - Java System.out and String.format errors -
Hello I'm new in Java and I have two errors, this is my code
Class clauses {public static zero main (string [] args) {newcast ozose = new neoclass (7311994); // new object}} my other class
public class new class {private int month; Private int de; Private int year; Public nuclass (int m, int d, int y) {month = m; Day = D; Year = y; System.out.printf ("Konstruktorius yra% s \ n", this); // Here is my first error) / Type the method in printfree (string, object []) is not applicable for printstrument argument (string, nucleus) / public string toString () {return string. Format ("% d /% d /% d", month, day, year); // Here is my second error}} / The method format (string, object []) is not applicable for arguments (string, int, int, int ) /
Your language level should be low. Go to project & gt; Properties & gt; Set the Java compiler and it in Java 8 (or whatever you want above Java 1.5). You may need to enable the project specific setting.
Comments
Post a Comment