F frol Membre confirmé 14 Janvier 2005 59 0 36 14 Septembre 2006 #1 bonjour je dois faire un retour à la ligne dans une variable en java j'ai essayé string mavar ="test1 test2"; évidemment ça ne marche pas Pourriez vous m'indique comment faire Merci Frol
bonjour je dois faire un retour à la ligne dans une variable en java j'ai essayé string mavar ="test1 test2"; évidemment ça ne marche pas Pourriez vous m'indique comment faire Merci Frol
P parabellum Membre enregistré 13 Septembre 2006 7 0 14 Septembre 2006 #2 Salut, tu peux écrire : String var = "ligne1\nligne2"; ou alors, pour avoir un retour à la ligne portable : String NEWLINE = System.getProperty("line.separator"); String var = "ligne1" + NEWLINE + "ligne2";
Salut, tu peux écrire : String var = "ligne1\nligne2"; ou alors, pour avoir un retour à la ligne portable : String NEWLINE = System.getProperty("line.separator"); String var = "ligne1" + NEWLINE + "ligne2";