Question: Given four int variables that have been declared and given values, octet1, octet2, octet3, and octet4, write a String expression whose value is the String

Given four int variables that have been declared and given values, octet1, octet2, octet3, and octet4, write a String  expression whose value is the String equivalent of each these variables joined by a single period (.) 

So if octet1, octet2, octet3, and octet4, had the values 129, 42, 26, and 212 the expression’s value would be “129.42.26.212”. Alternatively, if octet1, octet2, octet3, and octet4, had the values 192, 168, 1and 44 the expression’s value would be “192.168.1.44”.


Step by Step Solution

3.45 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution Editable code Program octet1 in... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!