You are on page 1of 7

Name- SIDDHANT SINGHANIA Roll number -20ucs194

Group members –
Shivral Somani (20ucs184)
Souhardya Malakar(20ucs197)

TASK 1
Screenshot from Eclipse for code and output for 1st task-
TASK 2
Drill 1- Printing values of s1 and s2.

Drill 2 – adding s1=s2 and something similar for integers and printing the
values.
Drill 3- added function void setName(String newname)

Drill 4 – here we demonstrate use of s1=s2.


On changing s1 = ”Three” s2 also holds the same value which can
only mean , s1 copies and stores the address of object of s2 rather
than copying the values of s2 , hence when we make changes to s1
we essentially are also making changes to s2.
Drill 5- i1 = i2 doesn’t produce similar results like s1=s2. From the
output(in console) we can clearly see that line number 14, i1=3 only
causes the change of value in i1 and not i2. Hence here we can say
that in i1 = i2 there is no copying of address taking place as it is a
normal integer variable and hence just copies the numerical value
in i2 , and in the next line it is assigned a new value of 3 , this has
no effect on the value of i2.
Task 3-
Accessing txt files from desktop.
Task 4-
Task 5- transliterating

You might also like