COMP 202 Lecture Notes - Lecture 22: Bracket, Null Pointer

69 views15 pages
hwpark22 and 40159 others unlocked
COMP 202 Full Course Notes
100
COMP 202 Full Course Notes
Verified Note
100 documents

Document Summary

In monday"s lecture, we started talking about classes , and making your own objects . In java, if we want to create our own data type (a data type that is an object), we have to first create a blueprint for the object. Every class file we make is a blueprint for an object that we can instantiate later on. We talked about the student class , a blueprint for creating an object of type student . Our code we wrote looked like: public class student{ public string firstname; public string lastname; public long id; public string email; We saw that it include the four student attributes. We saw that when creating attributes for a class, we have to have the variable name, the type of the variable, and the modifier up front ( public ). Once we"ve done that, we used the class file to create an object for type student. We did this in a separate file.

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