Jan10 - UCSD CSE 15L Java Debugging and the Scientic Method...

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

View Full Document Right Arrow Icon
UCSD CSE 15L Java Debugging and the Scientifc Method Week 2 January 10, 2011
Background image of page 1

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

View Full DocumentRight Arrow Icon
Quiz today 1.Take your quiz sheet and fold it closed . 2.At the announcement, unfold it and start. 3.Write on the front and, if necessary, on the back. 4.You have seven minutes. 5.Fold the quiz closed again, at the announcement.
Background image of page 2
Lab 2 The procedure for the lab this week is similar to last week. In lecture now, I will talk about debugging strategies. These will be useful in today’s lab. The strategies should sound sensible to you, based on your experience in the first lab.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Four debugging strategies 1.Remember basic facts about Java 2.Remember standard programming patterns. 3.Use a search engine to find an answer to your problem. 4.Understand the concepts of Java, e.g. the difference between a class and an object.
Background image of page 4
A fact about Java The operator == tests for identity, not for equal contents. So, don’t use it to test whether strings are equal. Instead, use the standard Java method: if (arg.equals("--help")) usage();
Background image of page 5

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

View Full DocumentRight Arrow Icon
A standard pattern Suppose we want to read a file line by line, until the EOF. A standard pattern to do this is
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

Jan10 - UCSD CSE 15L Java Debugging and the Scientic Method...

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

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