COIS 2240H Lecture Notes - Lecture 9: Compile Time, Type Safety

50 views2 pages

Document Summary

Inner classes cannot be seen by other classes. **you cannot have a private class in java. Local inner class- can be seen by the parent class, can be private, meaning no other classes can see it. Method local inner classes- they are local to the method. Anonymous inner class does(cid:374)"t have a (cid:374)a(cid:373)e. Onto generics: generics is a relatively new concept for java, the concept of generics existed inmoney programming languages, this is a real insight into how languages grow with time. What are generics: are a programming concept we use in order to be able to a type or a methos to operate on various. It is a placeholder for any type. different type of objects: generics are very important because they provide compile time safety. Generics: types safety: type safety is one of the top reasons that support for generics was added to java but what is it exaaclty, type safety refers to operations not causing undefined errors.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents