#"Record with Exceptions and Interface"

1 messages · Page 1 of 1 (latest)

peak minnowBOT
#

@high valley has a question:

truegrandeuriscoming

Please does someone know how to write a record that both use exceptions and interface? My current signature raise an unexpected token error:

public static void main(String[] args) throws InvocationTargetException, IllegalAccessException implements Json {
#

<@&987246399047479336> please have a look, thanks.

high valley
#

The AI-generated holds several false assertions. Besides, I mixed up the interface implementation into the entry-point in stead of declaring it at the signature-level -:) Easy fix.

flint warren
#

what you have there isn't a record, it's a method, and methods cannot implement interfaces