For part-a,just write the output of the code.
#part- b,c write the java code and run.
* note that all these are java code.
1. a) Write the output of these tw o parts of code without running code. public class PassTest float ptValue: public void change Int(int value) { value = 11; public void changeStr(String value) { value = new String ("hey"); 3 public void changeObiValue (PassTest ref) { refuntValue = 22; } public static void main(String args[]) { String str: int val PassTest nt= new PassTest: val = 33: Rt. change Int (val): System, out.println("Int value is: +yal): str = new String("Hi"):4 to change Str(str): System.out.println("Str value is: +str): Rt. RtValue = 44: Rt. changeObjValue (pt): System.out.println("Pt value is: +gt. ptValue): 14 ܢܟ 0 b) Evaluate the following expre ssion Until the last item is less than 0.0001 with while 1/2!+1/3+1/4!+1/5!......+1/1 5!....... c) Evaluate the following expre ssion Until the last item is less than 0.0001 with do... while 1/2!+1/3+1/4!+1/5!......+1/1 5!.......
For part-a,just write the output of the code. #part- b,c write the java code and run. * note that all these are java co
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am