Print variable whicj was read in another class
i have a project in several classes the 1st class read from keyboard data and the last 2 classes (one report on main) print out the content which was read , the calculation and start the aplication
the code is in next lines
class 1
/**
*
*/
package main;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* @author Nazakthul
*
*/
publicclass Citire{
private String linie;
publicvoid Cit()throws IOException{
BufferedReader input =new BufferedReader(new InputStreamReader(
System.in));
System.out.println("Give a String");
linie = input.readLine();
System.out.println(linie);
}
publicvoid setLinie(String linie){
this.linie = linie;
}
public String getLinie(){
return linie;
}
public Citire(){
}
}
Class 2
/**
*
*/
package main;
/**
* @author Nazakthul
*
*/
publicclass Raport{
Citire sir =new Citire();
publicvoid afisare(){
Stringsirul = sir.getLinie();
System.out.println(sirul);
}
}
class 3
/**
*
*/
package main;
import java.io.IOException;
/**
* @author Nazakthul
*
*/
publicclass Main{
publicstaticvoid main(String[] args)throws IOException{
Citire s =new Citire();
Raport raport=new Raport();
raport.afisare();
}
}
When i used String sirul = sir.getLinie
i wanted to memorize in sirul what i read from keyboard and use print to print the string but when i run the app what is comeback from app is |null|
what i have to do print what i read from KB
please HELP ME!!!

