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)
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...
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 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...
State whether the following statements are TRUE or FALSE. Give the reason, If a statement is...
State whether the following statements are TRUE or FALSE. Give the reason, If a statement is true, explain why; if it is false, identify the mistake and try to correct it. Use the diagram for explanation if needed. (NOTE: Marks are based on your reasoning, not only for T/F marking) (i). Change in quantity demanded and change in demand are the same things. (ii). If the demand curve for good A is flatter, and if the demand curve for good...
1.) A class template can be derived from a non-template class True or False 2.) Inaccessible...
1.) A class template can be derived from a non-template class True or False 2.) Inaccessible pointer is a potential problem on simple linked list True or False 3.) Array based lists are faster in term of acing data True or False 4.) Simple linked lists use less space than double linked lists True or False 5.) For large lists "array based lists" are more efficient for insertion and deleting operational True or False 6.) We can remove data only...
True or False 1. Like mission and vision statement, we can access to organizations’ strategy definitions...
True or False 1. Like mission and vision statement, we can access to organizations’ strategy definitions from their websites. 2. Strategy can be about doing similar things, but doing them differently 3. Strategic Fit will always ensure competitive advantage for organizations 4. The sources of industry level differences in profitability can be explained by having something unique and valuable(added value) & Finding an integrated set of choices that distinguish you from the rivals 5. Strategy can inform us how to...
java True or False. no need to explain 6. Class member variables should be declared as...
java True or False. no need to explain 6. Class member variables should be declared as private because the objectoriented programming principle of encapsulation. 7. The method public char getChar(); will return a character data. Page 2 8. Assume that there is a Class named Stock and the class has a constructor private Stock(String symbol, double price); So a programmer can create a Stock object by doing the following in the main method: Stock stock = new Stock(“Google Inc”, 578.45);...
True/False. Explain. a. In the aggregate expenditure model, the reason an economic can enter a recession...
True/False. Explain. a. In the aggregate expenditure model, the reason an economic can enter a recession is that spending falls. b. The classical assumption that labor markets clear makes it difficult for that model to explain recessions.
Java Create a Project named Chap4b 1. Create a Student class with instance data as follows:...
Java Create a Project named Chap4b 1. Create a Student class with instance data as follows: student id, test1, test2, and test3. 2. Create one constructor with parameter values for all instance data fields. 3. Create getters and setters for all instance data fields. 4. Provide a method called calcAverage that computes and returns the average test score for an object to the driver program. 5. Create a displayInfo method that receives the average from the driver program and displays...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT