Question

In: Computer Science

true or false give reason language in java 1.A static inner class can access the instance...

true or false give reason language in java

1.A static inner class can access the instance variables and methods of its outer non-static class
2.executeQuery from statement may return more than one resultset object
3.Connection is java.sql interface that establishes a session with a specific database
4.Writable is an interface in Hadoop that acts as a wrapper class to almost all the primitive data type
5.Text is the wrapper class of string in Hadoop

Solutions

Expert Solution

Following is the answer:

1.A static inner class can access the instance variables and methods of its outer non-static class
False
Any non-static nested class is known as inner class in java. Java inner class is associated with the object of the class and they can access all the variables and methods of the outer class. Since inner classes are associated with the instance, we can't have any static variables in them.

2.executeQuery from statement may return more than one resultset object
True

3.Connection is java.sql interface that establishes a session with a specific database
True

4.Writable is an interface in Hadoop that acts as a wrapper class to almost all the primitive data type
True

5.Text is the wrapper class of string in Hadoop
True
Writable is an interface in Hadoop. Writable in Hadoop acts as a wrapper class to almost all the primitive data type of Java. That is how int of java has become IntWritable in Hadoop and String of Java has become Text in Hadoop.


Related Solutions

Give an example of an inner and outer class. (Java)
Give an example of an inner and outer class. (Java)
Give the Answers to Following as true or False: Also give the reason 1. A salesperson...
Give the Answers to Following as true or False: Also give the reason 1. A salesperson giving a discount on a particular brand is an example of brand sponsorship. 2. Search engine optimization (SEO) uses a form of reverse engineering to influence search results. 3. Native advertising is similar to editorial content but is paid for by an advertiser 4. IMC stands for Integrated Marketing Customer. 5. Direct marketing is a personalized one-on-one form of communication.
Write a class called VLPUtility with the following static methods: Java Language 1. concatStrings that will...
Write a class called VLPUtility with the following static methods: Java Language 1. concatStrings that will accept a variable length parameter list of Strings and concatenate them into one string with a space in between and return it. 2. Overload this method with two parameters, one is a boolean named upper and one is a variable length parameter list of Strings. If upper is true, return a combined string with spaces in upper case; otherwise, return the combined string as...
1. Describe the difference between instance methods and class methods in Java and give an example...
1. Describe the difference between instance methods and class methods in Java and give an example of each. 2. A class variable is visible to and shared by all instances of a class. How would such a variable be used in an application? 3. Describe the difference between abstract classes and concrete classes, giving an example of each. 4. Explain how data are encapsulated and information is hidden in Java? 5. Explain the difference between a class and an interface...
True or False. If true, quote a relevant theorem or reason, or give a proof. If...
True or False. If true, quote a relevant theorem or reason, or give a proof. If false, give a counterexample or other justification. The set of irrationals in the interval (0, 1) is not countable. (Assume the fact that the set of points in the interval (0, 1) is uncountable.)
True or False. If true, quote a relevant theorem or reason, or give a proof. If...
True or False. If true, quote a relevant theorem or reason, or give a proof. If false, give a counterexample or other justification. There is a one-to-one and onto map between the open interval (0, 1) and the open interval (4, 8).
Determine the statement below is True or False, then give the reason. 1. Market demand for...
Determine the statement below is True or False, then give the reason. 1. Market demand for an item is influenced by factors (a) the price of the goods themselves, (b) tastes and preferences of consumers, (c) income, (d) prices of goods complement and substitution, (e) future expectations and (f) number of buyers. If the price factor of the item itself changes, cateris paribus, then the market demand curve for goods will shift to a new position. 2. Price elasticity is...
In simple Java language algorithm: Implement a static stack class of char. Your class should include...
In simple Java language algorithm: Implement a static stack class of char. Your class should include two constructors. One (no parameters) sets the size of the stack to 10. The other constructor accepts a single parameter specifying the desired size of the stack a push and pop operator an isEmpty and isFull method . Both return Booleans indicating the status of the stack Using the stack class you created in problem 1), write a static method called parse that parses...
In java beginner coding language ,Write a class called Sphere that contains instance data that represents...
In java beginner coding language ,Write a class called Sphere that contains instance data that represents the sphere’s diameter. Define the Sphere constructor to accept and initialize the diameter, and include getter and setter methods for the diameter. Include methods that calculate and return the volume and surface area of the sphere. Include a toString method that returns a one-line description of the sphere. Create a driver class called MultiSphere, whose main method instantiates and updates several Sphere objects.
In JAVA please... Define a class named Payment that contains an instance variable "paymentAmount" (non-static member...
In JAVA please... Define a class named Payment that contains an instance variable "paymentAmount" (non-static member variable) of type double that stores the amount of the payment and appropriate accessor (getPaymentAmount() ) and mutator methods. Also create a method named paymentDetails that outputs an English sentence to describe the amount of the payment. Override toString() method to call the paymentDetails() method to print the contents of payment amount and any other details not included in paymentDetails(). Define a class named...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT