• Post Reply Bookmark Topic Watch Topic
  • New Topic

Type mismatch error  RSS feed

 
vamsi naki
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have been trying to run a program(this is a question in a book to find the error and correct it ) , but i am getting this error.Can someone please explain why it is wrong ,because i think i did the right thing by creating an object for each of the reference variables.

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Type mismatch: cannot convert from testbooks[] to testbooks
Type mismatch: cannot convert from testbooks[] to testbooks
Type mismatch: cannot convert from testbooks[] to testbooks

at books.main(books.java:11)


 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hint: textbook[] is not a textbook
 
Micheal Quai
Greenhorn
Posts: 10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a[0]=new testbooks();
a[1]=new testbooks();
a[2]=new testbooks();

is that right?
i am chinese.
english bad
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Javaranch qb wto !

you are absolutely right!
 
Micheal Quai
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much !
i am new to java coding.
how can i make my english good ?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
qb wto wrote:how can i make my english good ?

you are asking question to wrong person. even I am struggling

when ever i visit book store to purchase English grammar book, i end up with buying technical stuff not an English stuff .
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
qb wto wrote:
how can i make my english good ?

Welcome to the Ranch!

Check out this thread on the Ranch, where something similar was being discussed http://www.coderanch.com/t/562713/md/improve-speaking-skills
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
qb wto wrote:how can i make my english good ?

Practise, practise, practise.

Posting on here probably isn't a bad idea for improving your writing skills either. We're a reasonably friendly bunch, and if you ask for corrections, know-alls like me will be happy to provide them.

Winston
 
vamsi naki
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help Seetharaman Venkatasamy and qb wto .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!