Question

In: Computer Science

1) Java uses a right brace to mark the end of all compound statements. What are...

1) Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design?
2) What a role does the symbol table play in a complier.

Solutions

Expert Solution

1) Right brace always terminates a compound .The argument are used for right braces to terminates compound is its simplicity.

In a program when we find the right brace then its matching left brace is not always obvious. Because all multiple structure and controlled statements are end with the right brace.

2)Symbol table plays the role in compiler as a database for the compilation process.Symbol table is a data structure created and maintaind by compiler for storing the information such as function name,objects and classes etc.


Related Solutions

create a regular expression in Java that defines the following. A "Stir" is a right brace...
create a regular expression in Java that defines the following. A "Stir" is a right brace '}' followed by zero or more lowercase letters 'a' through 'z' and decimal digits '0' through '9', followed by a left parenthesis '('.
5. Mark all of the true statements regarding a signal and a cue (mark all that...
5. Mark all of the true statements regarding a signal and a cue (mark all that apply)? (1 pt) a. A signal can be produced in a variety of environments using different modes of communication b. A cue is something in the environment that can be used for information by an individual but the information produced does not have a specific purpose c. A cue provides multimodal information d. A signal requires a sender and a receiver, in which the...
Which of the following statements is true? [1 mark] Closing entries are required at the end...
Which of the following statements is true? [1 mark] Closing entries are required at the end of each accounting period to close all ledger accounts Closing entries are designed to transfer the end-of-period balances in the revenue accounts, the expense accounts, and the withdrawals account to owner's capital.   Asset, liability, and revenue accounts are not closed while a company continues in business. The income summary account is used during the adjusting process to hold revenue, expenses, and withdrawals, before the...
What is the punctuation mark that is required to end every SQL statement?
What is the punctuation mark that is required to end every SQL statement?
Move all zeros in an arraylist to the end of the list using a temp(java). if...
Move all zeros in an arraylist to the end of the list using a temp(java). if it is an array the code would look like the code below, change it to fit an arraylist int count = 0;     int temp;     for (int i = 0; i < n; i++) {     if ((arr[i] != 0)) {         temp = arr[count];         arr[count] = arr[i];         arr[i] = temp;         count = count + 1;     }     } }
Which of the following statements are true for molecular geometry? Mark ALL that apply. •Molecular geometry...
Which of the following statements are true for molecular geometry? Mark ALL that apply. •Molecular geometry and electron geometry are always the same for any given molecule. •The molecular geometry describes the geometric arrangement of the actual atoms in a molecule. •There are more possible molecular geometries than there are electron geometries. •The molecular geometry can be determined without looking at the lone pairs on the central atom.
Match each subtype of lipid listed on the right to all statements on the left that...
Match each subtype of lipid listed on the right to all statements on the left that are appropriate to the lipid subtype. Question 12 options: 1234 the bi-layer that makes up the plasma membrane around a cell is considered a 'sea' of this type of lipid molecules 1234 the phospholipid, arachodonic acid, serves as the starting molecule that leads to the formation of members of this lipid subtype via the action of lipogenase and cyclooxygenase enzymes 1234 the main member...
**** All these methods should be implemented using RECURSIVE solutions (no looping statements) // Java //...
**** All these methods should be implemented using RECURSIVE solutions (no looping statements) // Java // This method takes an integer array as well as an integer (the starting // index) and returns the sum of the squares of the elements in the array. // This method uses recursion. public int sumSquaresRec(int[] A, int pos) { // TODO: implement this method        return -1; // replace this statement with your own return }    // This method takes a...
a) what are the definitions and business uses of calculating mark up and margin? sales revenue              ...
a) what are the definitions and business uses of calculating mark up and margin? sales revenue               168,000 purchase                      (128,000) Gross profit                     40,000 selling expenses           (20,000) operating profit               12,800 b) calculate mark up (in percentage to 1 decimal place. c) Calculate the margin as a % to 2 decimal places d) what is the operating profit margin percentage of selling expenses is reduced by 30% show this to 2 decimal places. e) Define the following and provide respective examples. Explain simple...
I. Please mark “True” or “False” to the following statements: (   ) 1. According to CISG,...
I. Please mark “True” or “False” to the following statements: (   ) 1. According to CISG, an offer can be withdrawn only when the withdrawal reaches the offeree before the offer. (   ) 2. According to CISG, an offer must be sufficiently definite. Therefore a proposal for concluding a contract does not constitute an offer if it does not indicate the time of shipment. (   ) 3. According to CISG, there must be a time of validity in an offer,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT