Page 1 of 1

1. Write the output of these code block without running (6) public class StringArrayTest{ public static void swap (Stri

Posted: Tue Jun 07, 2022 12:40 pm
by answerhappygod
1 Write The Output Of These Code Block Without Running 6 Public Class Stringarraytest Public Static Void Swap Stri 1
1 Write The Output Of These Code Block Without Running 6 Public Class Stringarraytest Public Static Void Swap Stri 1 (6.72 KiB) Viewed 27 times
1 Write The Output Of These Code Block Without Running 6 Public Class Stringarraytest Public Static Void Swap Stri 2
1 Write The Output Of These Code Block Without Running 6 Public Class Stringarraytest Public Static Void Swap Stri 2 (26.75 KiB) Viewed 27 times
1. Write the output of these code block without running

(6) public class StringArrayTest{ public static void swap (String [] s) { if (s. length<2) return; String t-s[0]; s[0]=s[1]; s[1]=t; } public static void main (String args[]) { String []s={"1","2"); swap (s); System.out.print (s [0]+s[1]); }