What is the output of this part of java program? String obj = abc; byte b[]...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
What is the output of this part of java program? String obj = "abc"; byte b[] = obj.getBytes(); ByteArrayInputStream obj1 = new ByteArrayInputStream(b); for (int i = 0; i < 2; ++i) { int c; while ((c = obj1.read()) != -1) { if(i == 0) (System.out.print((char)c);}}} What is the output of this part of java program? String obj = "abc"; byte b[] = obj.getBytes(); ByteArrayInputStream obj1 = new ByteArrayInputStream(b); for (int i = 0; i < 2; ++i) { int c; while ((c = obj1.read()) != -1) { if(i == 0) (System.out.print((char)c);}}}
Expert Answer:
Answer rating: 100% (QA)
String obj abc byte b objgetBytes ByteArrayInputStream obj1 new By... View the full answer
Related Book For
Posted Date:
Students also viewed these computer network questions
-
Read the case study and answer all the below questions and answers should be related/according to the case study. Case Study 1-Intercultural Communication - The ABC Company Read the case study...
-
What is the output of this code? Explain how did you made the file and provide a pic of the out put. import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class...
-
An object of height 3cm is placed at 10cm from a concave lens of focal length 15cm. Find the size of the image.
-
Graph the sets of points whose polar coordinates satisfy the equations and inequalitie. 0 , r = 1
-
Identify three transactions that cause debits or credits to an equity-method investment account.
-
SR 4.24 What are constructors used for?
-
What questions might a manager or team leader ask to help determine which problems to deal with and in which priority?
-
Your project to obtain charitable donations is now 30 days into a planned 40- day project. The project is divided into 3 activities. The first activity is designed to solicit individual donations. It...
-
5 Find an equation of a line perpendicular to y -2 that contains the point (-4,-3) 3
-
Refer to The Appraisal Journal (Summer 2019) study of the valuation of single Refer to The Appraisal Journal (Summer 2019) study of the valuation of singletenant properties. Recall that the ratio of...
-
Selected accounts balances of Sunset Cosmetics Inc for year ended December 31, 2023 are as follows: Sales Salaries and Commissions Advertising Expense Legal Services Insurance and Licenses Travel...
-
Factor the sum of two cubes completely. K (9y+1)+8
-
When Mark Cuban sold his company to Yahoo in 1995, he used a collar to protect himself against decreases in the price of Yahoo stock. He had acquired these shares when he sold his company but was not...
-
prepare the cash budget for October, November, and December, and for the quarter in total thank you! The company generally borrows money during this quarter to support peak sales. The above cash...
-
Construct a network using the information in the table and identify the critical path. Activity Time Predecessor A 14 B 6 C 19 D 11 AAB IE 16 B, C IF G H 487 14 ID 18 E, F 7 G Complete the table...
-
Variable Manufacturing Unit Cost Figurines Electrical Sets 20x1 Cost Projected Percent Increase 20x2 Cost Rounded to 7 Decimal Places 9.2000000 2.50% $9.4300000 (4.01) 1.2500000 2.50% $1.2812500...
-
4.22 L05, 9 Cash sales of $2079 have caused the worksheet to be out of balance because a mistake was made when the figures were put into the worksheet. The bookkeeper accidentally increased the cash...
-
A Alkynes can be made by dehydrohalogenation of vinylic halides in a reaction that is essentially an E2 process. In studying the stereochemistry of this elimination, it was found that...
-
Define a Response PDU (see Figure 27.18) using the syntax defined for structured data types in ASN.1. Figure 27.18 Figure 27.18 SNMP PDU format PDU header Variable bindings PDU type Request ib Error...
-
Find the efficiency of the AMPS protocol in terms of simultaneous calls per megahertz of bandwidth. In other words, find the number of calls that can be made in 1-MHz bandwidth allocation.
-
Assume a TCP server is expecting to receive byte 6001. It receives a segment with the sequence number 6001 that carries 2000 bytes. If the server has bytes 4001 to 5000 to send, what should the...
-
It is during the ____________ stage of team development that members begin to come together as a coordinated unit. (a) storming (b) norming (c) performing (d) total integration
-
Self-managing teams ____________. (a) reduce the number of different job tasks members need to master (b) largely eliminate the need for a traditional supervisor (c) rely heavily on outside training...
-
The best size for a problem-solving team is usually ____________ members. (a) no more than 3 or 4 (b) 5 to 7 (c) 8 to 10 (d) around 12 to 13
Study smarter with the SolutionInn App