1) Determine at least five advantages and five disadvantages of using bytecode o
ID: 3652953 • Letter: 1
Question
1) Determine at least five advantages and five disadvantages of using bytecode or Intermediate Language (IL) in computer applications. 2) Provide at least five reasons why an application designed and written for the Intel architecture cannot run on the Motorola architecture. Determine whether or not you believe that applications should be able to run on any computer architecture. Explain why or why not. 3) Propose at least five factors that programmers should consider when choosing between data types (such as those used in C and Java for signed and unsigned integers and real numbers) in an application. 4) Explain when a short integer, a long integer, and a very long integer should be used. Provide a case for each type. Determine which one of the three integer types is the most efficient in memory usage.Explanation / Answer
Bytecodes are compact numeric codes, constants, and references (normally numeric addresses) which encode the result of parsing and semantic analysis of things like type, scope, and nesting depths of program objects. They therefore allow much better performance than direct interpretation of source code. The Java Virtual Machine (JVM) is an environment that executes Java programs. Java programs are compiled into an intermediate language called bytecode, which is what the JVM executes. Any program compiled into bytecode can be executed on any platform that has a JVM installed on it. This makes Java software compatible with many different computing platforms. The JVM has a few notable advantages and disadvantages that any developer should weigh carefully before investing in Java development. The int type is the most versatile and efficient type, and it should be used most of the time when you want to create a number for counting or indexing arrays or doing integer math. It may seem that using short or byte will save space, but there is no guarantee that Java won't promote those types to int internally anyway. Remember, type determines behavior, not size. (The only exception is arrays, where byte is guaranteed to use only one byte per array element, short will use two bytes, and int will use four.) short is a signed 16-bit type. It has a range from –32,768 to 32,767. It is probably the least-used Java type, since it is defined as having its high byte first (called big-endian format). This type is mostly applicable to 16-bit computers, which are becoming increasingly scarce. long is a signed 64-bit type and is useful for those occasions where an int type is not large enough to hold the desired value. The range of a long is quite large. This makes it useful when big, whole numbers are needed. For example, here is a program that computes the number of miles that light will travel in a specified number of days.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.