This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package oops; | |
public class Account { | |
private double balance; | |
public Account() { | |
this.balance = 0.0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package javacode; | |
import java.lang.System; | |
import java.util.Scanner; | |
public class checknumber { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
System.out.print("Enter a number: "); | |
int number = scanner.nextInt(); |