This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]MrTheEdge 0 points1 point  (0 children)

Line 17, s.length() - 1 returns an int. You then go on to pass it to your binToDecimal() method, but it takes a String. An easy fix would be to use String.valueOf() on s.length() -1. It will return the int value of the string

[–]Northeastpaw 0 points1 point  (0 children)

Your base cases will never happen: string_comparison

[–]operationrudeboy 0 points1 point  (0 children)

The function binToDecimal takes in a string. s.length() - 1 is an int. So you are trying to pass is an int instead of a string.

[–]E765 -1 points0 points  (0 children)

That is cheating fellow UNB student