The code is dead in any version of Java. It’s not possible for a constructor to return null
, and even if an exception would be thrown from the constructor, the next line won’t be called.
More Related Contents:
- I need help making a java constructor that akes a string and initilizes the value var with appropriate in [closed]
- writing a constructor in java
- Avoiding NullPointerException in Java
- Why is my Spring @Autowired field null?
- What is null in Java?
- What is an initialization block?
- Java null check why use == instead of .equals()
- Check chains of “get” calls for null
- Possible causes of Java VM EXCEPTION_ACCESS_VIOLATION?
- Leaking this in constructor warning
- Java’s Date(…) constructor is deprecated; what does that mean?
- Can I call methods in constructor in Java?
- Why is constructor of super class invoked when we declare the object of sub class? (Java)
- State of Derived class object when Base class constructor calls overridden method in Java
- Horrendous performance & large heap footprint of Java 8 constructor reference?
- How to get the parameter names of an object’s constructors (reflection)? [duplicate]
- How many objects are created due to inheritance in java?
- Calling virtual method in base class constructor
- Why are constructors not inherited in java?
- order of constructor calls in multilevel inheritance in java [duplicate]
- Cannot instantiate the type for class object (Java)
- Instantiate a class object with constructor that accepts a string parameter?
- how to inherit Constructor from super class to sub class
- How can I access a private constructor of a class?
- Understanding the difference between null and ‘\u000’ in Java
- Is it possible in java to create ‘blank’ instance of class without no-arg constructor using reflection?
- Java: Exception itself is null
- What is the purpose of a no-arg constructor?
- In Scala, how can I subclass a Java class with multiple constructors?
- Why can’t I refer to an instance method while explicitly invoking a constructor?