Q&A Categories

Write the Java code to declare any constant (say gravitational constant) and to get its value?

Sep

7

2010

Write the Java code to declare any constant (say gravitational constant) and to get its value? Class ABC{static final float GRAVITATIONAL_CONSTANT = 9.8;public void getConstant(){system.out.println("Gravitational_Constant: " + GRAVITATIONAL_CONSTANT);}}’

In: Interests Asked By: claire [1 Grey Star Level]

Answer this Question

You must be Logged In to post an Answer.

Not a member yet? Sign Up Now »

Sep

7

2010

Write the Java code to declare any constant (say gravitational constant) and to get its value. Class ABC{static final float GRAVITATIONAL_CONSTANT = 9.8;public void getConstant(){system.out.println("Gravitational_Constant: " + GRAVITATIONAL_CONSTANT);}}’

In: Java Asked By: @mahesh@ [1 Grey Star Level]

Answer this Question

You must be Logged In to post an Answer.

Not a member yet? Sign Up Now »

Star Points Scale

Earn points for Asking and Answering Questions!

Grey Sta Levelr [1 - 25 Grey Star Level]
Green Star Level [26 - 50 Green Star Level]
Blue Star Level [51 - 500 Blue Star Level]
Orange Star Level [501 - 5000 Orange Star Level]
Red Star Level [5001 - 25000 Red Star Level]
Black Star Level [25001+ Black Star Level]