+ 5
what is the problem of this java question?
I found the below question from the challenge quizzes. I responded dot(.) and I got WRONG :( I was very sure while responding and I checked it on a compiler and I was RIGHT. but when I check for the correct answer on the challenge it was given as "error". I don't get what the error is. Do you? public static void main(String[] args) { String a="Programming is awesome."; System.out.println(a.charAt(a.length()-1)); }
7 odpowiedzi
+ 5
Thank you Sami Khan. I never noticed that even when I write it on a compiler. tricky quiz!
+ 4
Okey, Here is the google drive link to the screenshot.
https://drive.google.com/open?id=0Bw-oZgIQOMMwNWFaa3NSWXJDb1E
+ 3
I have the screenshot. But how can I share it.
+ 3
recheck the screenshot.. it is written "a.length"
whereas ".length()" is the method not ".length"
therefore it says as error
+ 3
yeah it is.. 😉
+ 2
do u have the screenshot of the challenge question?
Since the answer is correct, it shouldn't be an error
+ 2
upload it to Google drive or any cloud share and share it via link and copy the link and paste it here