Java
Write a literal representing the long integer value twelve billion.
LANGUAGE: JAVA CHALLENGE: Write a literal representing the long integer value twelve billion.
Read MoreWrite a literal representing the integer value zero.
LANGUAGE: JAVA CHALLENGE: Write a literal representing the integer value zero.
Read MoreWhich token is a literal?
LANGUAGE: JAVA CHALLENGE: Which token is a literal?
Read MoreWrite a statement that increases the value of the int variable total by the value of the int variable amount. That is, add the value of amount to total and assign the result to total.
LANGUAGE: JAVA CHALLENGE: Write a statement that increases the value of the int variable total by the value of the int variable amount. That is, add the value of amount to total and assign the result to total.
Read MoreGiven an integer variable profits, write a statement that increases the value of that variable by a factor of 10.
LANGUAGE: JAVA CHALLENGE: Given an integer variable profits, write a statement that increases the value of that variable by a factor of 10.
Read MoreGiven an integer variable bridgePlayers, write a statement that increases the value of that variable by 4.
LANGUAGE: JAVA CHALLENGE: Given an integer variable bridgePlayers, write a statement that increases the value of that variable by 4.
Read MoreGiven two int variables, firstPlaceWinner and secondPlaceWinner, write some code that swaps their values. Declare any additional variables as necessary.
LANGUAGE: JAVA CHALLENGE: Given two int variables, firstPlaceWinner and secondPlaceWinner, write some code that swaps their values. Declare any additional variables as necessary.
Read Morewrite some code that swaps the values in i and j. Use temp to hold the value of i and then assign j ‘s value to i.
LANGUAGE: JAVA CHALLENGE: Given three already declared int variables, i, j, and temp, write some code that swaps the values in i and j. Use temp to hold the value of i and then assign j ‘s value to i. The original value of i, which was saved in temp, can now be assigned to j.
Read Morewrite some code that swaps the values in i and j by copying their values to itemp and jtemp respectively, and then copying itemp and jtemp to j and i respectively.
LANGUAGE: JAVA CHALLENGE: Given two int variables, i and j, which have been declared and initialized, and two other int variables, itemp and jtemp, which have been declared, write some code that swaps the values in i and j by copying their values to itemp and jtemp respectively, and then copying itemp and jtemp to j and i respectively.
Read MoreDeclare a variable x, suitable for storing values like 3.14159 and 6.02E23.
LANGUAGE: JAVA CHALLENGE: Declare a variable x, suitable for storing values like 3.14159 and 6.02E23.
Read MoreDeclare a floatvariable named price.
LANGUAGE: JAVA CHALLENGE: Declare a floatvariable named price.
Read MoreDeclare a double variable named netWeight.
LANGUAGE: JAVA CHALLENGE: Declare a double variable named netWeight.
Read More