I have a question what is the most correct way for making variables that are accesible in all classes??
I know to ways, one harder than the other.
First one:
public class x {
public String z:
}
And second one is making the variables in one class, like locals and with setters and getters make something like this (I dont know to well this one). And in the class you want to use it you only use the constructor of the class
public class x {
public x{
String a:
}
set a (String){
this.a = a
}
}
Or something like that. (I hope you understand the way i Reffer.)
I want to know what is the most correct, in terms of coding quality, and what do professional programmers use.