{}
62
%OFF

Stop copy pasting code you don't actually understand

Build the coding confidence you need to become a developer companies will fight for

Stop copy pasting code you don't actually understand

Become a PRO
Become a PRO
62
%OFF

Stop copy pasting code you don't actually understand

Build the coding confidence you need to become a developer companies will fight for

Stop copy pasting code you don't actually understand

Become a PRO
Become a PRO
run-icon
Main.java
import java.util.Scanner; class FindSum{ public static void main(String[] args) { Scanner sc =new Scanner(System.in); int sum=0; int arr[]={1,2,3,4,5,6}; for(int i=0; i<arr.length; i++){ sum+=arr[i]; } System.out.println("sum is="+sum); } }
Output