What is the java source filename extension

Assignment Help JAVA Programming
Reference no: EM13690075

Answer the following questions in detail.

Question 1: What is the Java source filename extension? What is the Java bytecode filename extension?

Question 2: Write a Java statement to display the string The value is 100 to a user in a plain dialog box.

Question 3: What is the command you would use to compile the file Addition.java?

Question 4: What is the command you would use to execute the Addition class?

Question 5: What does a Java class contain that identifies it as a Java application?

Question 6: Write a Java statement that declares a constant called MAX which has a value of 1000.

Question 7: How do C++ chars differ from Java chars?

Question 8: Given a double variable called dval, write a single Java statement to prompt the user to enter the price of an item using JOptionPanes, convert the result and store it into dval.

Question 9: Write one Java statement to display the string “The average is xxx” to the console, where the xxx displays the value from the double variable sum divided by 3. Make sure the value is displayed with 3 digits following the decimal point.

Question 10: Write one Java statement to create a string containing The average is where the xxx contains the formatted value from the double variable sum divided by 3. Make sure the formatted string contains only 2 digits following the decimal point. Store the formatted string into a String variable called str.

Question 11: Explain the difference between an object reference in Java and an object. Use an example to illustrate your answer.

Question 12: Explain how objects are created in Java and how the memory used by objects is recovered. Compare this to object creation and destruction in C++.

Question 13: Explain how primitive values like doubles are passed between functions in Java. How are string objects passed between functions in Java?

Question 14: How are static methods different from non-static methods? How do you invoke a static method? Give an example of a static method.

Question 15: Write an expression that returns a random value between 1 and 100. The values 1 and 100 must be included in the values that can be returned.

Question 16: Write one Java statement that creates an array of 100 doubles.

Question 17: Write one Java statement that creates an array of integers containing the multiples of 10 between 10 and 100, including 10 and 100.

Question 18: Write one Java statement that would take an array A and copy its contents into array B. Assume that A and B already exist and that B is at least as large as A and that they are both of the same data type.

Question 19: Write a Java method which takes an integer array parameter and locates the minimum value in the array and outputs that value using System.out.printf. Use an enhanced for loop to process the array. You only need one loop to do this!

Question 20: Write a Java method which takes an integer array parameter and fills the array with random numbers between 1 and 1000, including 1 and 1000. Use a traditional for loop to process the array.

Solve this problem using java programming concepts.

Reference no: EM13690075

Questions Cloud

What is the percent ionization of solution of this acid : Problem- The Ka of a monoprotic weak acid is 3.38 Ã- 10-3. What is the percent ionization of a 0.149 M solution of this acid
Convert the hexadecimal numbers to binary : Convert the following hexadecimal numbers to binary, then add them togather (assume you have an 8 bit processor that uses 2' compliment representation). : -
Why embedded system processor would use concurrent processes : Explain why embedded system processor would use concurrent processes to control an alarm system in a home. Door and Window switches, motion detector all controlled through a central panel.
How many moles of calcium fluoride is produced : Problem- When 0.54 moles of CaCO3 are put in a reaction vessel with plenty of aluminum fluoride, how many moles of calcium fluoride is produced
What is the java source filename extension : What is the Java source filename extension? What is the Java bytecode filename extension and write a Java statement to display the string The value is 100 to a user in a plain dialog box.
Write a balanced equation for the reaction : Problem- Ethyl acetate reacts with H2 in the presence of a catalyst to yield ethyl alcohol- C4 H8O2(l) +H2(g)-------> C2H6O6(l) Part a) Write a balanced equation for the reaction.
Calculate the ph of a solution made by mixing equal volumes : Problem- Calculate the pH of a solution made by mixing equal volumes of a solution of HCl with a pH of 1.44 and a solution of HNO3 with a pH of 2.74. Assume the volumes are additive
Application which tests the random number generation : Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers.
How many moles of cac2o4 are present in this kidney stone : Problem- The principal component of many kidney stones is calcium oxalate, CaC2O4. A kidney stone recovered from a typical patient contains 8.5 x 10^20 formula units of calcium oxalate. How many moles of CaC2O4 are present in this kidney stone

Reviews

Write a Review

JAVA Programming Questions & Answers

  Mutant bacterium-synthesize the amino acid tyrosine

Consider a mutant bacterium you have isolated which is unable to synthesize the amino acid tyrosine. You grow it in the presence of a chemical mutagen and isolate a single revertant, which is now able to grow in the absence of tyrosine

  What position along the chord does minimum pressure occur

At what position along the chord does the minimum pressure occur? What is special about the point where C p is a maximum?

  Java tv''s newest owner! java tv is the greatest tv channel

Java TV's newest owner! Java TV is the greatest TV channel ever, and it prides itself in its 24 hour interesting ' programming'. To help you run this channel you will need to write a  dynamic  program that uses  Data Lists  to store all its TV show i..

  1 linked listsin this problem you will write a class that

1 linked listsin this problem you will write a class that implements an ordered list of strings. your class will able

  Write down a java gui application index2java based on the

write a java gui application index2.java based on the program in step 1 that inputs several lines of text and uses

  Assume that you are developing a java program which uses

suppose that youre developing a java program that uses decimal numbers and youd like to control the formatting of your

  Write java classes for the class diagram

Write Java classes for the class diagram. You don't need to write any set and get methods for simplicity.

  Program that prompts the user to enter the year and display

Write a program that prompts the user to enter the the year and first day of the year and displays the calendar table for the year on the console. For example , if the user entered the year 2013, and 2 for tuesday, January 1, 2013, your program shoul..

  Part-1prepare a program that teaches arithmetic to a young

part-1prepare a program that teaches arithmetic to a young child. the program tests subtraction and addition. in level

  Demonstrate knowledge of design patterns

Your software should make use of the concepts outlined at the start of the assignment brief above. Think about where you can employ appropriate design patterns and other techniques.

  Create an application for disney''s cottages

Create an application for Disney's Cottages, a weekend getaway resort that rents cottages and boats to use on the local lake

  Write a program comprising classes

Write a program comprising three classes: MonteCarlo (with the main() method), Simulation, and Metrics.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd