Your second option is not a valid one and you need to specify the type either in new objecttype() statement or separtely. C heck your code you should find statments like:
# does not come under the permissible identifier part. Check using Character.isJavaIdentifierPart('#') which will return false. For more information refer:
The i value is first incremented in catch block and then in finally block. BTW why do you want to increment the value in catch and finally instead you could do it after finally block
Userdefined exceptions are always Runtime and when you write your own exception then it should extend any java defined Runtime exceptions like Exception, FileNotFoundException etc.
Compile time errors are jdk level errors like syntax errors, identifier errors etc. Hope this helps.
In Wrapper class you will find several utility methods for eg: Integer has method to convert an int to a String and a String to an int etc, Character has methods to change the cases, check for digits, identify spaces etc