Homework 4
This commit is contained in:
parent
0afc86ceeb
commit
72cc3206c4
125 changed files with 4200 additions and 1636 deletions
16
javali_tests/HW4_nop90/OkCasts.javali
Executable file
16
javali_tests/HW4_nop90/OkCasts.javali
Executable file
|
@ -0,0 +1,16 @@
|
|||
/* testing casting as well as creating new Objects*/
|
||||
class Main
|
||||
{
|
||||
void main()
|
||||
{
|
||||
int a;
|
||||
int b;
|
||||
Object c;
|
||||
Object d;
|
||||
|
||||
c = null;
|
||||
d = new Object();
|
||||
a = 10;
|
||||
c = (Object) d;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue