0
Error "cannot convert string to stringbuffer" . How do I modify this code
import java.util.Scanner; class MyClass { public static void main(String[ ] args) { Scanner myVar = new Scanner(System.in); StringBuffer n = new StringBuffer(); n=myVar.nextLine(); System.out.println(n); } }
2 Respuestas
+ 6
StringBuffer n=new StringBuffer(myVar.nexrLine());
+ 2
why not just switch stringbuffer to string