Hellfire103@lemmy.ca to Programmer Humor@programming.devEnglish · 7 days agoTIFU by not using objects in my object-oriented programming courseworklemmy.caimagemessage-square29fedilinkarrow-up1101arrow-down13cross-posted to: programmerhumortifu@lemmy.world
arrow-up198arrow-down1imageTIFU by not using objects in my object-oriented programming courseworklemmy.caHellfire103@lemmy.ca to Programmer Humor@programming.devEnglish · 7 days agomessage-square29fedilinkcross-posted to: programmerhumortifu@lemmy.world
minus-squareschema@lemmy.worldlinkfedilinkarrow-up3·7 days agoIs the class declared static? I assume the “…ic class Answer07” at the top stands for “public class Answer07”. I don’t think java supports top level static classes (it does have nested static classes, though).
minus-squarelad@programming.devlinkfedilinkEnglisharrow-up1·5 days agoIt looks like exactly 4 characters are missing, so public and static would fit, but I never saw static instead of public static, so I think you’re right. On the other hand, I don’t use Java anymore and couldn’t be bothered about such details
Is the class declared static? I assume the “…ic class Answer07” at the top stands for “public class Answer07”.
I don’t think java supports top level static classes (it does have nested static classes, though).
It looks like exactly 4 characters are missing, so
public
andstatic
would fit, but I never sawstatic
instead ofpublic static
, so I think you’re right. On the other hand, I don’t use Java anymore and couldn’t be bothered about such details