Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Compiler Error(Help)  RSS feed

 
Akash Trivedi
Greenhorn
Posts: 18
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So,i was just playing with some codes(Ques 8,chapter 3 of sybex book 1) and then suddenly compiler went mad at me :

C:\Users\Mr_Nobody\java>javac StringTest.java
StringTest2.java:3: error: incompatible types: java.lang.String cannot be converted to String
String numbers = "12345678";
^



I don't understand,should I call method from different class.?
 
Dave Tolls
Rancher
Posts: 2913
35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That error doesn't match the code you posted.
Also, have you created your own String class by accident?
 
Akash Trivedi
Greenhorn
Posts: 18
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops,my bad. I created the String class by mistake. Thanks for pointing out. ;)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!