import java.util.Scanner; public class Genere2 { private double amt; private A other; public Genere2(A other, double amt) { this.other = other; this.amt=amt; } public static void main(String[] args) { Genere2 gg = new Genere2("ASDF", 44.5); System.out.println(gg); Genere2 g3 = new Genere2(99.5, 44.5); System.out.println(g3); Genere2 g4 = new Genere2(new Scanner("Now is the time for all good"), 99.8); System.out.println(g4); } @Override public String toString() { return other + " AMT:" + amt; } }