14a-recursive_programming_2

14a-recursive_programming_2 - CSE143 Lecture14(A)...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 143 Lecture 14 (A) More Recursive Programming reading: 12.2 - 12.3, 12.5 slides created by Marty Stepp http://www.cs.washington.edu/143/
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Exercise Write a method  crawl  accepts a  File  parameter and prints  information about that file. If the  File  object represents a normal file, just print its name. If the  File  object represents a directory, print its name and  information about every file/directory inside it, indented. cse143 handouts syllabus.doc lecture_schedule.xls homework 1-sortedintlist ArrayIntList.java SortedIntList.java index.html style.css recursive data : A directory can contain other directories.
Background image of page 2
3 File  objects File  object (from the  java.io  package) represents a file or directory on the disk. Constructor/method Description File( String ) creates  File  object representing file with given name canRead() returns whether file is able to be read delete()
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/04/2011 for the course CSE 143 taught by Professor Sr during the Spring '08 term at University of Washington.

Page1 / 5

14a-recursive_programming_2 - CSE143 Lecture14(A)...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online