+ 1

There is problem here can you help!? In java

Hi everyone my code in java it doesn’t work This’s my code :- Book b[]=bookstore.searchBycategory(“businees”); If (x!=null) for(i=0;i<bookstore.getnumOfBook;i++) System.out.println(x[i].gettitle());<< // there is problem it is just give me Exception and title !???🤷🏻‍♀️ Did you see any problem here !??? Hint:i have two calss ✌🏻

10th Feb 2018, 7:18 PM
Anoud Al-Subaie
2 odpowiedzi
0
The problem could be in bookstore class. Or in x variable.
11th Feb 2018, 12:01 AM
Toni Isotalo
Toni Isotalo - avatar
0
Be more precise: what exception it gives? Or try to use more brackets if(x!=null) { for(int i=0; i<bookstore.getNumOfBook(); i++) { System.out.println(x[i].getTitle()); } }
11th Feb 2018, 12:45 AM
Leonardo Medai Cossutta
Leonardo Medai Cossutta - avatar