public class Class1 {
public static String word = "Class1 word";
public Class1() {
String class2Word = Class2.word; // Get string "word" from class "Class2".
}
}
public class Class2 {
public static String word = "Class2 word";
}
this.variable = otherClassObject.getVariable();
Code Example |
---|
:: |
Java :: loop through string in java |
:: |
:: |
:: |
Javascript :: |
:: |
Javascript :: get jquery version from console |
:: |
:: |
:: |
:: |
Javascript :: |
Javascript :: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
Javascript :: |
:: |
Javascript :: |
Javascript :: |
Javascript :: updating node js ubuntu |
:: |
:: |