Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Function {
- // Procedure
- public static void main(String[] args) {
- Hallo();
- interest(1_000_000, 5, 7);
- }
- // Procedure
- static void Hallo(){
- System.out.println("Hai Universe...");
- }
- // Function (PARAMETER)
- static void interest(double money, double percent, double months){
- var result = money * (percent/100) * (months/12);
- int results = (int) result;
- System.out.println("Money: "+money+" Percent: "+percent+" Month: "+months+" Interest: "+results+" Decimal: "+result);
- }
- }
- /* 1. Function without parameter (Procedure), example: main()
- * 2. Function with parameter, example: interest(parameter). interest() is constructor
- * 3. Function with return (method)
- */
- // Pray 4 Uyghur: https://bylinetimes.com/2020/08/24/death-is-everywhere-millions-more-uyghurs-missing/
Advertisement
Add Comment
Please, Sign In to add comment