Question

Write one difference for items below a.     char versus Character b.     Source code versus Byte code c.    Complier error...

Write one difference for items below

a.     char versus Character

b.     Source code versus Byte code

c.    Complier error versus Runtime error

d.   char [ ] versus String [ ]

Homework Answers

Answer #1

a.

char is a keyword used to create a variable of Character data type but the Character is a class used to create object.

b.   

The source code is the program written as a text file but the bytecode is the intermediate code that is executed by Java Virtual Machine(JVM). This code helps to achieve the platform independence feature in Java.

c.   

The compiler error is the error that stops the compiler to compile the code due to error in the source code bu the errors which are generated while the program is running are known as a runtime error.

d.

The char[] is used to create an array of characters but the String[] is used to create an array of string.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
In assembly masm use the code below! Write a program that reverse a string using indirect...
In assembly masm use the code below! Write a program that reverse a string using indirect addressing (may not use the stack - push/pop). The string will be given by the user and be up to 64 characters long INCLUDE Irvine32.inc INCLUDE macros.inc MAX = 64 .data source BYTE MAX DUP('#'),0 destination BYTE LENGTHOF source DUP('*'),0 actual_length DWORD ? ask BYTE "Enter a String: ",0 .code main proc ; ask user for input mov edx, OFFSET ask call WriteString ;...
Write a Java program with a method public String replaceChar(String p, int k, char c) {...
Write a Java program with a method public String replaceChar(String p, int k, char c) { } that given a String p, an int k, and a char c, returns a String with the kth character replaced by c. Of course, 0<=k<=p.length()-1, otherwise raise an exception or error.
write a statement that declares char variable named gender initialized to the character m in c++...
write a statement that declares char variable named gender initialized to the character m in c++ additionally, What is the value of number after the following code executes? int a=5; int b=10; int number = a++ + b++; lastly, The break; is required in every case block of a switch statement true or false and A default block is required in every switch statement true or false
How to code a function like the one below in C? (NOT C++) int hashCreate(char szFileNm[],...
How to code a function like the one below in C? (NOT C++) int hashCreate(char szFileNm[], HashHeader *pHashHeader) This function creates a hash file containing only the HashHeader record. • If the file already exists, return RC_FILE_EXISTS • Create the binary file by opening it. • Write the HashHeader record to the file at RBN 0. • fclose the file. • return RC_OK
C++: Write a function that receives a pointer to a character string consisting of only alphabets...
C++: Write a function that receives a pointer to a character string consisting of only alphabets a-z and returns the character with the maximum number of repetitions. If more than one-character repeats same number of times, return the character with smallest alphabetical order. For example, the string “Mississippi” has three repeated characters (i-4, s-4, p-2). Both ‘i’ and ‘s’ repeated 4 times but ‘i’ is alphabetically smaller hence the function should return ‘i’. Do not count repeated blanks, special characters,...
Write a function to create a copy of a string with the prototype below. (C Language)...
Write a function to create a copy of a string with the prototype below. (C Language) char * strcpy (const char *); The function should dynamically allocate the necessary memory for the new string. You can do that with char * newstr = (char *) malloc(sizeof(char) * (strlen(str)+1)); assuming str is your input string. Think though how you would copy the characters of the string, and don't forget about the end of string character.
Question 2.   Explain preprocessor directives in C. Describe Error and pragma directives and write code snippets....
Question 2.   Explain preprocessor directives in C. Describe Error and pragma directives and write code snippets. Describe define, and undef, directives. Write the code which shows if constant “VALUE” is not defined then define it and replace its value to 5 on runtime. Display the value of x. int x = VALUE;
1) Explain the difference between: Array of characters like char c[] = {'A', 'B', 'C'}; AND...
1) Explain the difference between: Array of characters like char c[] = {'A', 'B', 'C'}; AND c-string like string = "ABC"; 2) We can have two pointers that point to one memory location such as: int *intPtr1, *intPtr2; intPtr1 = &x; intPtr2 = &x; a) What method we have to make sure only one pointer points to a variable? b) Give an example. 3) a) Can a pointer to a constant receive an address of a constant item and/or non-constant...
Using python, write the program below. Program Specifications: You are to write the source code and...
Using python, write the program below. Program Specifications: You are to write the source code and design tool for the following specification: A student enters an assignment score (as a floating-point value). The assignment score must be between 0 and 100. The program will enforce the domain of an assignment score. Once the score has been validated, the program will display the score followed by the appropriate letter grade (assume a 10-point grading scale). The score will be displayed as...
Write a program that takes a string of characters (including spaces) as input, computes the frequency...
Write a program that takes a string of characters (including spaces) as input, computes the frequency of each character, sorts them by frequency, and outputs the Huffman code for each character.   When you are writing your program, you should first test it on a string of 7 characters, so you can check it. PLEASE NOTE: Your program must work for any text that has upper and lower case letters digits 0 - 9, commas, periods, and spaces. Please submit the...