Question

would someone please kind enough to help me out on my intro to java study guide...

would someone please kind enough to help me out on my intro to java study guide by helping me with some useful tips/ examples or anything on these questions.

My grade is on the line and would really appreciate your help!

Final exam study guide

13. truncating vs rounding - Where do you encounter truncation? Where do you encounter rounding?
14. Can you identify the following items in a Java source code example (using just syntax, usage, and naming convention)?
Java reserved/keyword, primitive, array, object, class, named constant, literals (integer literal, floating point literal, character literal, string literal, Boolean literal), instance variable, void method, return method

15. Overloading - What is overloading? When is it valid for two methods to be overloaded?
16. When evaluating an expression, what are the three rules for order of operations?
17. List the operators (or their categories) in order of precedence.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

13.

Truncating: In Java, truncating is referred as chopping of the decimal part of a number. For example, 5.8 can be truncated to 5.

Rounding: In Java, rounding is referred as rounding the decimal part of a number up to specified number of decimals. For example, rounding of 5.865 to two decimal places is 5.87.

Truncating is used whenever the decimal part needs to be excluded where as the concept of rounding is used to round the decimal part of a number up to certain decimals.

14.

Reserved / keyword: In Java, some words are reserved for certain functionality and they cannot be used as identifiers. For example, while, do, class, abstract etc.

Primitive: In Java, primitive types are the basic data types such as int, float, double, long, char, short, Boolean, byte. These are used for manipulating the dats.

For example, int d=5; char c=’A’; float num=3.564;

Array: Array holds the elements of similar type in contiguous locations.

For example, int arrElem[]={5,4,8};

Object: Object is a real-world entity. The objects share properties of a class.

For example, Dog t1=new Dog(); // t1 is the object of the class Dog.

Class: In Java, class is a blueprint which contains set of properties. The object of a class shares the properties of a class.

Named constant: The value of the named constant is permanent which cannot be changed during the execution of a program.

For example, final int num=4;

Literals: In Java, literals are syntactic representation of data. Various of Java literals are integer literal, floating point literal, character literal, string literal, Boolean literal. These are used to represent a fixed value.

Instance variable: The instance variable is created when the object is created. These variables can be accessed by calling the variables of the class.

Void method: Void is used as a return type for the method which returns nothing.

Return method: The method that returns some type of data is the return method. The return type may be int, float, double etc.

15.

Overloading: Overloading is a concept in which the class can have more than one method having the same name with different arguments.

This concept is valid if and only if there are more methods with same name having different arguments.

16.

The three rules while evaluating the expression are,

  • First evaluate the operations within the parenthesis (if found).
  • Next, perform all multiplication and division operations from left to right of the expression.
  • After that, perform all addition and subtraction operations from left to right of the expression.

17.

In evaluating the expressions, order of precedence should be followed. The order of preference in Java is,

  • The operators with in the Parenthesis
  • postfix increment and decrement operators (++, --)
  • prefix increment and decrement, and unary operators (++, --, +, -, ~, !)
  • multiplicative operators (*, /, %)
  • additive operators (+, -)
  • shift operators (<<, >>, >>>)
  • relational operators (<, >, <=, >=)
  • equality operators (==, !=)
  • bitwise AND operator (&)
  • bitwise exclusive OR operator (^)
  • bitwise inclusive OR operator (|)
  • logical AND operator (&&)
  • logical OR operator (||)
  • ternary operator (? :)
  • assignment operators (=, +=, -= etc.)
Add a comment
Know the answer?
Add Answer to:
would someone please kind enough to help me out on my intro to java study guide...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Intro to Java. Can someone please help me answer this question. Create a java program playing...

    Intro to Java. Can someone please help me answer this question. Create a java program playing the game of craps with a random number generator. Write a method craps that plays the game of craps and it should return a 1 representing a win, a 2 representing a loss, and a 0 representing the need to toss the pair of dice again. The main method should ask how many games you wish to play then call the method craps. Main...

  • Please help me with my accounting final study guide by providing a definition and any useful...

    Please help me with my accounting final study guide by providing a definition and any useful information for the following accounting terms: • uncollectible account • accounting for uncollectible accounts • allowance method • allowance for doubtful accounts • bad debts expense

  • Can someone help me with the main class of my code. Here is the assignment notes....

    Can someone help me with the main class of my code. Here is the assignment notes. Implement project assignment �1� at the end of chapter 18 on page 545 in the textbook. Use the definition shown below for the "jumpSearch" method of the SkipSearch class. Notice that the method is delcared static. Therefore, you do not need to create a new instance of the object before the method is called. Simply use "SkipSearch.jumpSearch(...)" with the appropriate 4 parameter values. When...

  • please help me on 12 106 Java Concepts Advanced Placement CS Study Guide 3 12. Consider...

    please help me on 12 106 Java Concepts Advanced Placement CS Study Guide 3 12. Consider the following code segment. int count = 0; for (int x = 0; x< 3; x++) for (int y = x; y < 3; y++) for (int z - y: z < 3; 2++) count++; What is the value of count after the code segment is executed? a 81 b. 27 JOHNNNN mshe thote c. 10x d. 9 e, 6 13. Each segment of...

  • Please help me with this study guide! I'm getting conflicting results with my friends. 1. (15...

    Please help me with this study guide! I'm getting conflicting results with my friends. 1. (15 pts) With the following Income Statement find the following financial ratios: Income Statement - XYZ, Inc. - Jan 1 - Dec 31 Sales 800,000 Expenses Cost of Goods Sold 350,000 Gross Profit 450,000 Operating Expenses Salaries 180,000 Freight 15,000 Bad Debt 4,000 Utilities 22,000 Depreciation 14,000 Amortization 8,000 Insurance 12,000 Advertising 15,000 Interest 9,000 Miscellaneous 4,000 Total Oper Expenses 283,000 Operating Profit 167,000 Income...

  • Can someone help me finish my table? all the inforamtion is there. molarity of HCL =0.5M g...

    can someone help me finish my table? all the inforamtion is there. molarity of HCL =0.5M grams of borax = 18.41g the Relationship between Thermodynamics and Equilibrium 21 Complete the data table for each temperature studied. Beaker Label 42 °C 45 °C 36 ° C 39 °C 33 °C 2EC 138℃-2°C| ーでー 46℃ Temperature reading (C) Absolute temperature (K) 1/T Final buret reading Initial buret reading Volume of HCI Moles of H+ Moles of B Os(OH)2 Molarity of B,Os(OH)2 306.230.2...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT