Your solution has been submitted!

(You can close this window)

Coding tests are not compatible on small screen devices like mobiles, please switch to a Desktop or Laptop.
You have 5 minutes to solve this problem.

This session will automatically time-out after 5 minutes and can no longer be accessed, start immediately.

Problem: Debug Java Program
Language: java
Description:

There are some bugs in the provided code. These bugs maybe be logical errors, or syntactical errors or a combination. Fix the code.

import Java.util.*; import java.io.*; import java.util.Scanner; class BuzzNumberExample { static void checknumber(number) { if(number % 10 == 7 || number % 7 == 0) return true; //returns true when the number is Buzz else return false; //returns flase when the number is not Buzz } // main() method start public static void main(String args{}) { int n1, n2; //create scanner class object to get input from user Scanner sc=new Scanner(System.in); //show custom message System.out.println("Enter first number"); //store user entered value into variable n1 n1 = sc.nextInt(); //show custom message System.out.println("Enter second number"); //store user entered value into variable n2 n2 = sc.nextInt(); if (checkNumber(n1)) System.out.println(n1 + " is a Buzz number"); else System.out.printIn(n1 + " is not a Buzz number"); if (checkNumber(n2) System.out.println(n2 + " is a Buzz number"); else System.out.println(n2 + " is not a Buzz number"); } }