how we can remove hard code in java?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is jdbc and explain jdbc architecture?

520


When does the result for an sql statement return null?

517


What is preparedstatement in jdbc?

520


What is the difference between execute, executeQuery, executeUpdate?

529


Discuss the procedure of retrieving warnings?

561






What is a merge field?

505


In which ways is driver class is registered with drive manager?

529


Which of the attributes in the monitoring tab for a jdbc connection pool in the administrative console tell us how many clients are currently waiting for a connection?

523


What are the different types of JDBC drivers?

620


What causes the "No suitable driver" error?

538


Can I set up a connection pool with multiple user IDs? The single ID we are forced to use causes problems when debugging the DBMS.

525


Name the method, which is used to prepare a callablestatement.

510


What is jdbc? Describe the steps needed to execute a sql query using jdbc.

507


What is jdbc dialect?

507


What is a statement in java?

515