6 years ago in Introduction To Java

In java , if you do not give a value to a variable before using it ,______

[A] It will contain a garbage value
[B] It will initialized with zero
[C] Compiler will give an error
[D] None of above
Loading...
Next Question

Overall Stats

Attempted 1149
Correct 190
Incorrect 472
Viewed 487

Answers

Guest
Guest
Appalabattula Santhi - 3 years ago

If it is declared as global variable, then compiler will not give any error.

Shubhangi Misal - 3 years ago

plz give explaination for this ans

Youssef Aserrar
Youssef Aserrar - 3 days ago

Youssef Aserrar from Casablanca, Morocco is saying Compiler will give an error is correct answer

MOUAD BOUKNITER
MOUAD BOUKNITER - 3 days ago

MOUAD BOUKNITER from Casablanca, Morocco is saying Compiler will give an error is correct answer

rita elradi
rita elradi - 3 days ago

rita elradi from Casablanca, Morocco is saying It will contain a garbage value is correct answer

Related Questions

_________ is a software that interprets Java bytecode.

  • [A] Java virtual machine
  • [B] Java compiler
  • [C] Java debugger
  • [D] Java API

Which statement is true?

  • [A] Objects that can be reached from a live thread will never be garbage collected.
  • [B] Programs will not run out of memory.
  • [C] Objects that will never again be used are eligible for garbage collection.
  • [D] Objects that are referred to by other objects will never be garbage collected.

Main method parameter has which type of data type

  • [A] String
  • [B] Int
  • [C] char
  • [D] double

In which we clone the object and their constituent parts

  • [A] Shallow Cloning
  • [B] Deep cloning
  • [C] Both
  • [D] none