Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 2 (7 points) If the size of the Database object is 120 bytes and each reference is 4 bytes long, how many bytes
Question 2 (7 points) If the size of the Database object is 120 bytes and each reference is 4 bytes long, how many bytes does the following code excerpt occupy in memory? Database db1 = new Database(); Database db2 = db1; Question 3 (10 points) 1- Write a Java method that receives a parameter of type String and returns its first character as a char. (Hint: look at how to use the charAt(int index) method of the String class) 2- Write a test program the calls the method and prints the output. 3- Submit your .java files for this question. MacBook Air 80 000 PA DII F4 F5 F6 F7 F8 69 F10
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Question 2 Given Size of Database object 120 bytes Size of each reference 4 bytes ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started