{
}
Online Python Compiler
Online R Compiler
Online SQL Editor
Online HTML/CSS Editor
Online Java Compiler
Online C Compiler
Online C++ Compiler
Online C# Compiler
Online JavaScript Compiler
Online Typescript Compiler
Typescript Online Compiler
Scala Online Compiler
Dart Online Compiler
Ruby Online Compiler
Online GoLang Compiler
Online PHP Compiler
Online Swift Compiler
Online Rust Compiler
Generating Link
Generating Link
Share your code
Share code
Copy Link
Copied to clipboard
or share using
Online Java Compiler
Learn Python App
Learn Python
Main.java
Output
Main.java
Share
Run
Run
import java.util.Scanner; class FindSum{ public static void main(String[] args) { Scanner sc =new Scanner(System.in); int prod=1; int arr[]={1,2,3,4,5,6}; for(int i=0; i<arr.length; i++){ prod*=arr[i]; } System.out.println("product is="+prod); } }
Output
Clear