Moti Barski super


Posts : 499 Join date : 2011-08-02
 | Subject: my java pair variable class Mon Apr 22, 2019 10:27 pm | |
| class : - Code:
-
public class DCStrPair<T> { public T key; public T value; } usage : - Code:
-
DCStrPair<String> testN1 = new DCStrPair<>(); testN1.key = "hello "; testN1.value = "world"; System.out.println(testN1.key + testN1.value);
_________________ MB over and out  | |
|
Moti Barski super


Posts : 499 Join date : 2011-08-02
 | Subject: Re: my java pair variable class Mon Apr 22, 2019 10:30 pm | |
| I could call the class DCPair : data class pair but I'll be using it with strings. _________________ MB over and out  | |
|