Access Millions of academic & study documents

Object Oriented Progamming Lab Report

Content type
User Generated
Subject
Computer Science
Type
Lab Report
Showing Page:
1/2

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/2

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
LAB TASKS 09 OBJECT ORIENTED PROGAMMING 18-SE-45 TASK 01: import java.util.Scanner; import java.util.StringTokenizer; public class task1 { public static void main(String[] args) { int sum=0,num; System.out.println("Enter String: "); Scanner input=new Scanner(System.in); String number=input.nextLine(); StringTokenizer token=new StringTokenizer(number); System.out.println("Entered String is: "); while(token.hasMoreTokens()) { String str=token.nextToken(); num=Integer.parseInt(str); System.out.print(num + " "); sum=sum+num; } System.out.println(); System.out.println("Sum is : "+sum); } } OUTPU ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Similar Documents