Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ArrayList and Object

807601Dec 9 2007 — edited Dec 10 2007
I have been at this for two days now. When I complie I get: cannot find symbol method(java.lang.String)

I also found out that the reason that I am getting that complier error is because the argument needs to be a courseSection object. Can someone point me in right direction on how to convert the String into a CourseSection object? Thanks.
Scanner fileReader = new Scanner(
				new FileInputStream("class-schedule.txt"));		
								
				 
				ArrayList<CourseSection> schedule = new ArrayList<CourseSection>();
				
				
					//for(int index = 0; index < schedule.size(); index++)
					while(fileReader.hasNextLine())			
				
				schedule.add(fileReader.nextLine());
				
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2008
Added on Dec 9 2007
19 comments
105 views