CSCE 3193 Lecture Notes - Lecture 14: Iter, Javac, Method Stub

25 views2 pages

Document Summary

Bytecode-code used by jvm, created by compiler (. class). Void-(cid:373)ethod does(cid:374)"t retur(cid:374) a(cid:374)ythi(cid:374)g. constructor-used to i(cid:374)itialize o(cid:271)je(cid:272)t"s data at (cid:272)reatio(cid:374). default constructor-no parameters or all parameters have default values(0,false/null), complier implicitly declares a default constructor. Reference-non-primitive type(string) stores lo(cid:272)atio(cid:374)s of o(cid:271)je(cid:272)ts i(cid:374) the (cid:272)o(cid:373)puter"s (cid:373)e(cid:373)ory. Local-scope of variables within method, not initialized by default. Instance- scope of variables defined in a class(private, public). Extends-keyword, class declaration may extend super class and inherit methods. Overloading-same method name, different arguments. polymorphism -object takes on many forms(parent class reference is used to refer to child class object). instanceof- tests if object is a certain subtype. Interface- class with abstract methods(ex: public interface myinterface {public string hello = hello;public void sayhello();}). Abstract- declared with no implementation, uses keyword abstract, only superclasses. public abstract void makenoise();. final -holds final value of variable. Generic- used to make similar methods take different parameters(ex: public static void printarray( t[] inputarray){ for(t element: inputarray) syste(cid:373). out. pri(cid:374)tf(cid:894)(cid:862)%s(cid:863), ele(cid:373)e(cid:374)t(cid:895);syste(cid:373). out. pri(cid:374)tl(cid:374)(cid:894)(cid:895);}}.

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