Вы находитесь на странице: 1из 1

Section2.2.

3FloatingPointDataTypes
20541:Declareafloatvariablenamedprice.
floatprice
20542:DeclareadoublevariablenamednetWeight.
doublenetWeight
20511:Declareavariablex,suitableforstoringvalueslike3.14159and6.02E23.
floatx
20980:Writeasinglestatementthatwillprintthemessagefirstisfollowedbythevalueoffirst,andthenaspace,followed
bysecond=,followedbythevalueofsecond.Printeverythingononelineandgotoanewlineafterprinting.Assume
thatfirsthasalreadybeendeclaredasadoubleandthatsecondhasbeendeclaredasanint.Assumealsothatthe
variableshavealreadybeengivenvalues.
System.out.println("firstis"+first+"second="+second+"\n")