answersLogoWhite

0


Best Answer

If you are talking about the Switch statement the default value key is that in which if none of the other case statements are true will be processed.

For example:

Day = "Sat";

switch (day) {

case "Mon": System.out.println("Welcome to the begining of the week"); break;

case "Tue": System.out.println("Day 2 keep it up"); break;

case "Wed": System.out.println("Hump Day"); break;

case "Thu": System.out.println("Almost there"); break;

case "Fri": System.out.println("Another week down have a great weekend"); break;

default: System.out.println("Weekend work again"; break;

}

As we set day to Sat there was no case for Sat and therfore the default key would be used for both Sat and Sun.

Hope this helps

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the purpose of the default value key?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is it possible to set a default values to a primary key which is auto increment?

In Mysql: No You will get error :Invalid default value for 'id'


What is default values of different primitive data types?

in integral data types default value=0 in decimal type default value is 0.0 in boolean default value is fa


What the purpose of insert key?

It allows you to insert text at the insertion point. The default is to replace text when you type someplace in the middle of a word, but if you press the insert key, you will insert instead of replace with the text you type.


What is default value of Boolean type variable?

False will be the default value of the boolean datatype in java


What is default value of formal arguments?

In C, there is no default value for formal parameters. In C++, there can be, but the value is whatever you declare in the function declaration.


What type of integrity is enforced when a primary key is declared?

By default a primary key is also a unique constraint, that means only one row can contain a specific value for this key (or no duplicates are allowed). Also an index is automatically created for a primary key allowing efficient access.


What are the three components to data definition?

Type, name and initial value. If a value is not given and the type supports default construction, a default value is assigned.


What is the default value of a reference?

null


How is a default value set in MS Access?

When you provide a default value for a field in Access, Access will automatically insert this value into the field when a record is inserted that has no value (NULL) for this field. Default values are used when there is a sensible default for a field.


What is the difference between default and value in the configuration file of the Tibco admin?

Default is the value that has been given for a GV during design .But in Value field we can modifie the GV value during deployement.


What value is assigned to extern variable?

Default initial value of extern integral type variable is zero otherwise null.


What value is the one that a DBMS initially displays in a field?

a default value