


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The differences between string and stringbuffer classes, including their immutability and methods. It also discusses exception handling in java, focusing on runtime errors and logic errors. Examples of common exceptions and their solutions.
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!
Announcements: Quiz Friday – Review next time. Last Time: String and StringBuffer What are some major differences between the String and StringBuffer classes?
A couple of weeks ago, we said that there were two types of errors that we could make when we wrote a program: syntax errors and logic errors. Let's look at the logic error category in more detail. What kinds of errors did we just see? These are called runtime errors. The program terminates because something goes wrong. There is another type of logic error – the program doesn't throw an exception, but it produces the wrong result. What distinctions can you see between the runtime errors we just saw?
Lab Create a new project. Create a new class named GetMonth. This class has one public method: public void getMonth() This method should call other (private) methods to: