+ 1
Why the result of this Java code is no output ??
Java code 👇 https://code.sololearn.com/cwgBzXsPmMfs/?ref=app
6 ответов
+ 5
Here not present main function. And you didn't call the function.
Every Java program starts Execute from main function
+ 2
Vadivelan Atul get now error...
 import java.util.Scanner;
public class BankAccount {
  private double balance=0;
  Scanner balance = new Scanner(System.in);
    System.out.println(BankAccount.nextLine()); 
  public void deposit(double x) {
    if(x > 0) {
      balance += x;
      System.out.println(balance);
    }
    else if(x < 1) {
      balance -= x;
      System.out.println(balance);
    }
    else {
      System.out.println(x);
    }
  }
}
+ 2
Jeff's JK (HTML challenger and the coders 💻)🇮🇩  I think, you should Go through the Java course.
+ 1
Bro use Scanner input for it
+ 1
If you want your Java program to do something when it is compiled, there should be "public staic void main (String [])" function, in which code to execute is written.
+ 1
Ok...



