+ 1
Hello everyone, So I have problem in this code, there is no output and I can't find the reason
4 Respostas
+ 3
No Main method or main method declarartion is wrong. Missing static
public static void main ( String a[] ) {
..
}
edit:
Mohamed Hassan Hassan
and why you need 4 objects..?
see this modified code :
public class Program
{
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
customerdata n = new customerdata();
n.fname = s.next();
n.sname = s.next();
n.age = s.nextInt();
n.room = s.nextInt();
n.data();
}
}
+ 2
Thank you very much ❤️
+ 2
New learner just trying but I really appreciate your help ❤️
+ 1
U have to input all the 4 fields to see the result thats y