userName = keyboardIn.nextLine();
my program wont compile due to this piece of code. It comes out as Incompatible type. I'am a first year student doing java programming. I have declare my variable String userName = new String();
Can anyone see the problem from this because I cant
javajames January 27, 2012 at 1:17 AM
userName = keyboardIn.nextLine(); my program wont compile due to this piece of code. It comes out as Incompatible type. I'am a first year student doing java programming. I have declare my variable String userName = new String(); Can anyone see the problem from this because I cant
Error: Incompatible typesNehru March 5, 2012 at 6:19 PM
textfield = new TextField("First Name:", "", 40, TextField.ANY); error: incompatible types textfield = new TextField("First Name:", "", 40, TextField.ANY); required: Textfield found: TextField
java-error-incompatibletypesrony October 29, 2012 at 5:33 PM
public void breadthFirstTraversal(Node rootNode){ Queue q = new LinkedList(); q.add(rootNode); rootNode.visited=true; while(!q.isEmpty()){ Node n = (Node)q.poll(); System.out.print(n.data + " "); for(Node adj : n.adjacentNodes{/*incompatible type required: graphsearch.Node found: java.lang.Object*/ if(!adj.visited){ adj.visited=true; q.add(adj); } } } } How to solve?
CamilleriDaniel December 6, 2012 at 1:06 AM
Thx very much it worked Now i can complete my school project
Post your Comment