520
link
fedilink
-18M

So this looks like it’s based in Java code.

A public class means that any bit of Java code, including that injected by an attacker, can see and mess with the contents of that class.

A private class, in contrast, means that other bits of Java code are restricted to running the class’s predefined functions.

In theory it is supposed to help with the security of the data. In practice if an attacker gets to this point, you’ve got much bigger issues.

po-lina-ergi
link
fedilink
5
edit-2
8M

Private Vs public has nothing to do with security

If people can execute arbitrary code in your app, they can already read your memory, and even if they couldn’t they could use java reflection to just turn off the private modifier

Accessibility modifiers are to do with maintainability. If you have internal implementation logic that should be hidden from a consumer you don’t want that consumer to have to know about things they shouldn’t be changing anyway.

The comic is just about how classnames in java should be in pascal case

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 64 users / day
  • 250 users / week
  • 420 users / month
  • 2.88K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.9K Comments
  • Modlog