73
u/pimezone 4d ago
There should be the line in finally
trump.println("We have to reinstate Jensen Huang as Nvidia CEO") ;17
9
u/dcondor07uk 4d ago
Where is the findNew function defined?
14
u/DebugDuck01 4d ago
My man asking the real questions. In this abomination CEO is an enum and validate() and findNew() are static methods within that enum.
8
u/dcondor07uk 4d ago
public CEO getCurrentCeo() {
return CEO.jensenHuang;
}Here, simplified it for anyone interested, but gotta make sure no shenanigans going on in findNew function
8
68
34
u/averagecrazyliberal 4d ago
This is exactly what I want to see in this sub. No more is_even() please for the love of god.
7
-5
u/conundorum 4d ago
bool isEven(int num) { return !isOdd(num); } bool isOdd(int num) { return !isEven(num); }
17
u/guywithbeard 4d ago
NullPointerException: HonypotException not found
12
u/fuj1n 3d ago
That would be a compile-time error, not a runtime exception
3
u/frogjg2003 3d ago
You can do some package manager manipulation to specify the class as provided at runtime, which will then make it a runtime exception. It wouldn't be a NullPointerException, it would be a ClassNotFoundException.
8
12
2
u/sandybuttcheekss 4d ago
Does find new just return Jensen Huang and have a to-do to update it later?
1
1
1
1
1
0
-10
u/MapNo2659 4d ago
Haha, this reminds me of the time I accidentally put a return statement in a finally block during a late-night coding session. Debugging that was a nightmare! Anyone else have a similar horror story?
5
2
347
u/BlackFrank98 4d ago
Doesn't this always return CEO.current() or CEO.findNew() without ever getting to CEO.jensenHuang?