answersLogoWhite

0

What else can I help you with?

Continue Learning about Engineering

In Java method usually hold the properties of an object. True or False?

true


It is an error to have a method with the same signature in both the super class and its subclass. True or false?

False. A method with the same signature in both the superclass and its subclass is known as method overriding, and is a valid concept in Java.


What is the result of True AND False OR True?

True AND False OR True evaluates to True. IT seems like it does not matter which is evaluated first as: (True AND False) OR True = False OR True = True True AND (False OR True) = True AND True = True But, it does matter as with False AND False OR True: (False AND False) OR True = False OR True = True False AND (False OR True) = False AND True = False and True OR False AND False: (True OR False) AND False = True AND False = False True OR (False AND False) = True OR False = True Evaluated left to right gives a different answer if the operators are reversed (as can be seen above), so AND and OR need an order of evaluation. AND can be replaced by multiply, OR by add, and BODMAS says multiply is evaluated before add; thus AND should be evaluated before OR - the C programming language follows this convention. This makes the original question: True AND False OR True = (True AND False) OR True = False OR True = True


Which method is default by true in java?

I don't understand what you mean with "default by true"? Please clarify your question. A Java method can have zero or more parameters, and it must have one return value. Any of these can be declared as "boolean", in which case the value can be either true or false.


When a variable is declared within a method it ceases to exist when the method ends true or false?

It really depends on the programming language, but in general, this is true. In Java, for example, the scope of a variable declared in a method is the method - outside of the method it is inaccessible, and once the method finishes execution, the variable disappears.