Java共有三類八種,分別為:字元型別char、布林型別boolean以及數值型別byte、short、int、long、float、double。數值型別又可以分為整數型別byte、short、int、long和浮點數型別float、double。