how we can remove hard code in java?



how we can remove hard code in java?..

Answer / sreenivas

by using command line arguments and System properties .
by using the command line arguments ,we can pass the values
from the command line as well as with same order with same
order .but in System properties, we can pass the values in
any order by using System.getProperty() meethod and pass
the values from the command line we specify the option -D
and followe by variable name=value.

Is This Answer Correct ?    19 Yes 5 No

Post New Answer

More JDBC Interview Questions

What does adapter class provide?

0 Answers  


Is jdbc secure?

0 Answers  


What types of DataSource objects are specified in the Optional Package?

0 Answers  


In JDBC, All the API?s are interfaces? Where is the actual implementation?

3 Answers   HCL,


signature of init method?

2 Answers  


What are cursor attributes?

3 Answers  


What do you mean by jdbc batch processing and what are the advantages of using jdbc batch processing?

0 Answers  


What are the packages are used in jdbc?

0 Answers  


How can we execute stored procedures using callablestatement?

0 Answers  


What is database deadlock ?

0 Answers  


Name the types of jdbc drivers.

0 Answers  


Which Java and java.sql data types map to my specific database types?

0 Answers  


Categories