fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. class NumberGenerator {
  8. String a, b, c;
  9.  
  10. NumberGenerator(Double a, Double b, Double c) {
  11. this.a = a.toString();
  12. this.b = b.toString();
  13. this.c = c.toString();
  14. }
  15.  
  16. public String toString() {
  17. //return String.format("%s %s %s", this.a, this.b, this.c);
  18. System.out.printf(this.a + " " + this.b + " " + this.c);
  19. return "";
  20. }
  21. }
  22.  
  23.  
  24. class Ideone
  25. {
  26. public static void main (String[] args) throws java.lang.Exception {
  27. NumberGenerator n = new NumberGenerator(1.0, 2.0, 3.0);
  28. System.out.println(n);
  29. }
  30. }
Success #stdin #stdout 0.14s 37900KB
stdin
Standard input is empty
stdout
1.0 2.0 3.0