Null pointer exception error in kotlin, calling the parameters of one class to run under another class , Forexample , Class A , it has two variable of EditText, edt1 and edt2 , in Class B , it has two TextViews, txt1 and txt2 ,
declare ” var test = Class A()” and I called them as ” txt1 = test.edt1.text.toString( ) and
txt2 = test.edt2.text.toString( ) ” But null pointer exception , please guide me to avoid this