I want to make multiple object of DFA class and Initialize its field value by object through . I don't want to initialize array size. How I Initialize array field direct through object using {}.
when I Initialize like that in class its work fine.
int[][] TT={{1,2},{2,1}};
but when I try to initilize like that through object then its not work. Here my code.
public class DFA {
int[][] TT;
int IS;
int[] FS;
}
public static void main(String[] args) {
DFA fa1=new DFA();
fa1.IS=0;
fa1.FS={1}; //Both FS and TT give error
fa1.TT={{1, 2}, {1, 2}, {2, 2}};
}
fa1.TT=new int[][]{{1, 2}, {1, 2}, {2, 2}};