1. There should not be more than 3 nested if-else/for/while. Ex. if() {if(){ while(){if()}}} is not allowed, because it will be hard to remember the logic.
  2. Don’t…

1. 1
2. 0.9999999999999999
3. 1.0000000000000001
4. 0.9999999999999999D
public class JavaChallenge38 {
public JavaChallenge38() {
}

public static void main(String[] args) {
System.out.println(0.9999999999999999D);
}
}
1. Compilation Error
2. ClassA
3. ClassB
4. ClassC
5. ClassC can not be cast to ClassB
return (ClassA) o; 

Govinda Raj

Senior Software Developer. Tech Enthusiast and love coding. My portfolio: https://govinda-raj.github.io/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store