‘public static final’ or ‘private static final’ with getter?

There’s one reason to not use a constant directly in your code. Assume FOO may change later on (but still stay constant), say to public static final int FOO = 10;. Shouldn’t break anything as long as nobody’s stupid enough to hardcode the value directly right? No. The Java compiler will inline constants such as … Read more

Is it possible to declare a public variable in vba and assign a default value?

.NET has spoiled us 🙂 Your declaration is not valid for VBA. Only constants can be given a value upon application load. You declare them like so: Public Const APOSTROPHE_KEYCODE = 222 Here’s a sample declaration from one of my vba projects: If you’re looking for something where you declare a public variable and then … Read more

Class vs. Public Class

Without specifying public the class is implicitly internal. This means that the class is only visible inside the same assembly. When you specify public, the class is visible outside the assembly. It is also allowed to specify the internal modifier explicitly: internal class Foo {}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)