Question

true or false in JAVA 1) A literal value is a value that is typed directly...

true or false in JAVA

1) A literal value is a value that is typed directly into the code, such as 10, 14.6, or "Bob".

2) Local variables can only be accessed from within the block in which they are defined.

3) All variables must be declared before they can be used.

4) If a method returns nothing, its return type should be null.

5) A method with an int parameter can be invoked with a String argument.

6) A class can extend any number of other classes.

7) After an array has been built, its size can be changed by modifying its length property.

8) An abstract class provides a superclass from which other classes can inherit.

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

1) True
2) True
3) True
4) False
5) False
6) False
7) True
9) True
Add a comment
Know the answer?
Add Answer to:
true or false in JAVA 1) A literal value is a value that is typed directly...
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
  • Java Questions A class must implement at least one interface. Question 1 options: True False Question...

    Java Questions A class must implement at least one interface. Question 1 options: True False Question 2 (1 point) Abstract methods can be called. Question 2 options: True False Question 3 (1 point) Constructors Question 3 options: Are inherited but cannot be accessed Are inherited and can be accessed Are accessible but are not inherited Are not inherited and cannot be accessed Question 4 (1 point) We can instantiate an object from an abstract class. Question 4 options: True False...

  • In JAVA Algorithm Workbench 1. Write the first line of the definition for a Poodle class....

    In JAVA Algorithm Workbench 1. Write the first line of the definition for a Poodle class. The class should extend the Dog class. 2. Look at the following code, which is the first line of a class definition: public class Tiger extends Felis In what order will the class constructors execute? 3. Write the statement that calls a superclass constructor and passes the arguments x, y, and z. 4. A superclass has the following method: public void setValue(int v) value...

  • For Java, 1. What is an abstract method? How is an abstract method created? 2. What...

    For Java, 1. What is an abstract method? How is an abstract method created? 2. What is an abstract class? 3. Can an object of an abstract class be instantiated? 4. Does a superclass have access to the members of subclass? Does a subclass have access to the members of the superclass? 5. How do you prevent a subclass from having access to a member of a superclass? 6. Given the following hierarchy: class Alpha{ … class Beta extends Alpha...

  • 1.     When a sub class object is created, when is the call to the super class...

    1.     When a sub class object is created, when is the call to the super class constructor made? How does a programmer call the super class constructor from the sub class? What do all classes indirectly extend? What methods does every class inherit from the Object class? 2.     When writing methods in a sub class, how can those methods call the methods from the parent class? 3.     Which class is more specific, a super class or a sub class? 4.    ...

  • In Java Which of the following statements declares Salaried as a subclass of payType? Public class...

    In Java Which of the following statements declares Salaried as a subclass of payType? Public class Salaried implements PayType Public class Salaried derivedFrom(payType) Public class PayType derives Salaried Public class Salaried extends PayType If a method in a subclass has the same signature as a method in the superclass, the subclass method overrides the superclass method. False True When a subclass overloads a superclass method………. Only the subclass method may be called with a subclass object Only the superclass method...

  • PRG/421 Week One Analyze Assignment – Analyzing a Java™Program Containing Abstract and Derived Classes 1.    What is...

    PRG/421 Week One Analyze Assignment – Analyzing a Java™Program Containing Abstract and Derived Classes 1.    What is the output of the program as it is written? (Program begins on p. 2) 2. Why would a programmer choose to define a method in an abstract class (such as the Animal constructor method or the getName()method in the code example) vs. defining a method as abstract (such as the makeSound()method in the example)? /********************************************************************** *           Program:          PRG/421 Week 1 Analyze Assignment *           Purpose:         Analyze the coding for...

  •            1.         You often need to know the inheritance ____________________ of the Java API to work...

               1.         You often need to know the inheritance ____________________ of the Java API to work with its classes and subclasses.            2.         All objects have access to the methods of the ____________ class.            3.         If two classes share some common elements, you can define those elements in a ____________.            4.         To call a constructor or method of a superclass from a subclass, you use the ____________ keyword.            5.         A class that can be inherited by another...

  • Java Mr. Dealer is trying to keep track of his new cars and used cars by...

    Java Mr. Dealer is trying to keep track of his new cars and used cars by writing a Java program. He needs your help in setting up his classes. Implement a superclass named Car that contains a price instance variable, a getPrice method, and a 1-parameter constructor. The getPrice method is a simple accessor method that returns the price instance variable’s value. The 1-parameter constructor receives a cost parameter and assigns a value to the price instance variable based on...

  • Java Programming (use jGrasp if not thats fine) Write a Two classes one class that creates...

    Java Programming (use jGrasp if not thats fine) Write a Two classes one class that creates a two-dimensional 2 rows by 3 columns double array. This class will have a separate method for the user to populate the array with data values. The other class that has the following methods:   getTotal. This method should accept a two-dimensional array as its argument and return the total of all the values in the array.   getAverage. This method should accept a two-dimensional array...

  • What is the code for this in Java? Assignment Inheritance Learning Objectives Declare a subclass that...

    What is the code for this in Java? Assignment Inheritance Learning Objectives Declare a subclass that derives from a superclas:s ■ Demon "Declare a variable of the superclass type and assign it an instance of the subclass type strate polymorphic behavior Access the public members of the superclass type Notice how the overridden versions of the subclass type are called Notice how the subclass specific members are inaccessible "Create an array of superclass type and use a foreach loop to...

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