DOC PREVIEW
OSU CSE 1223 - CL11A

This preview shows page 1 out of 2 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ClosedLab11a author version 20141010 import java util ArrayList import java util Scanner public class Lab11a public static void main String args Scanner sc new Scanner System in System out println Enter the first wordlist ArrayList String list1 getList sc System out println nEnter the second wordlist ArrayList String list2 getList sc System out println nWordlist 1 n displayList list1 System out println nWordlist 2 n displayList list2 System out println nList 2 appended to the end of List 1 n displayList appendLists list1 list2 System out println nList 1 appended to the end of List 2 n displayList appendLists list2 list1 private static ArrayList String getList Scanner inScanner ArrayList String list new ArrayList String while true String word System out print Enter a word XXX to quit word inScanner next if word equals xxx word equals XXX break else list add word return list private static void displayList ArrayList String myList int i int len myList size for i 0 i len i System out println i myList get i private static ArrayList String appendLists ArrayList String list1 ArrayList String list2 ArrayList String appendedList new ArrayList String int i len1 list1 size len2 list2 size for i 0 i len1 i appendedList add list1 get i for i 0 i len2 i appendedList add list2 get i return appendedList


View Full Document

OSU CSE 1223 - CL11A

Documents in this Course
PRO12A

PRO12A

3 pages

PRO11A

PRO11A

4 pages

PRO10A

PRO10A

3 pages

PRO9A

PRO9A

3 pages

PRO8A

PRO8A

3 pages

PRO7A

PRO7A

2 pages

PRO6A

PRO6A

2 pages

PRO4A

PRO4A

3 pages

PRO3A

PRO3A

3 pages

CL13A

CL13A

2 pages

CL11B

CL11B

2 pages

CL10A

CL10A

2 pages

CL5A

CL5A

2 pages

Load more
Download CL11A
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CL11A and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CL11A and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?