java - Returning a String from a public String (...) class -
here code
import java.io.*; import java.lang.*; import java.util.*; public class createfile { private formatter x; scanner keyboard = new scanner(system.in); string s1,s2,s3,s4,s5,s6; string aa,bb,cc,dd,ee,ff; public void openfile() { try { x = new formatter("password.txt"); }catch(exception e) { system.out.println("\nerror"); } } public void add(string s1,string s2,string s3,string s4,string s5,string s6) { bugatti v = new bugatti(); fw m = new fw(); fw2 s = new fw2(); fw3 eb = new fw3(); fw4 e = new fw4(); fw5 r = new fw5(); x.format("%s%s%s%s%s%s",aa,bb,cc,dd,ee,ff); } public void close() { x.close(); } }
ok in file have returned aa bb cc dd ee ff , x.format not seeing that!!! have in fact returned in classes defined bugatti , fw,2,3,4,5. how is't x.format looking @ return. know doing wrong noob @ please teach me how can fix this!!
what evver try ... if aa in case aa should use
x.format("%s%s%s%s%s%s", v.aa(s1),m.bb(s2),s.cc(s3),eb.dd(s4),e.ee(s5),r.ff(s6);
(don't know if v.aa(s1) returns...) instead of
x.format("%s%s%s%s%s%s",aa,bb,cc,dd,ee,ff);
anyway, why use such names ? :o creepy...
Comments
Post a Comment