Question
1.   Predict the output of the code public
class Animal { Â Â public static void main(String args[]) Â Â Â Â Â Â Â Â Â Â Â {Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â public int localVar = 5; Â Â Â Â Â Â Â Â Â Â Â } Â Â Â Â Â Â Â Â }Solution
- Illegal Access Modifier in Method Scope :
- The keyword public is not allowed within the body of a method to declare a variable. Variables declared inside methods are considered local variables, and local variables cannot have access modifiers (public, private, protected).
- This results in a compilation error.
Mirror formula is
In a nuclear reaction, the product nucleus has higher binding energy per nucleon than the reactants. Which of the following is correct?
Where is the magnetic force of a bar magnet the strongest?
Which metal is liquid at room temperature? Â
If a body of mass 5 kg is raised to 10 meters height, find its potential energy. (g = 9.8 m/s²) Â
What does the slope of a velocity-time graph represent?
The current across the 3 ohm resistance in the given circuit is:
In an electric motor, energy is transformed from:
What is the work done when a force of 10 N moves an object by 5 m in the direction of the force? Â
Global warming is expected to result in