Example of loan amount calculation function implemented in Java

This article describes the loan amount calculation function implemented in Java. Share with you for your reference, as follows:

Problem and code:

Operation results:

Summary of knowledge points:

Cast of data type (explicit conversion), math.pow, priority

experience:

I feel that the priority of Java is similar to that of others. Java is particularly strict with types, and will not automatically convert all of them. A small type can be widened by becoming a large type, and a large type can be widened by becoming a small type. If a type is not converted, an error will occur.

In addition, when the variable types are different, there will be an error if it is not converted. For example, assign int to short or byte

I didn't feel much trouble at first, but now it does seem a little trouble.. And I don't quite understand the meaning of object-oriented. Ow~~

Finally, record a knowledge point: in the output statement of Java, some "line feed, carriage return, tab, etc. cannot be used, but escape characters can be used, such as:

Double quotation mark @ h_ 419_ 35 @ is \ "single quote @ h_419_35 @ is \ 'backspace @ h_419_35 @ is \ B tab@H_419_35 @Yes \ tfound @ h_ 419_ 35 @ \ nreturn @ h_ 419_ 35 @ \ r backslash @ h_ 419_ 35@ \\

PS: Here we recommend several calculation tools for your further reference: @ h_ 419_ 35@

Online loan calculator: @ h_ 419_ 35@http ://tools. jb51. net/jisuanqi/daikuan_ jisuanqi

Online bank mortgage calculator: @ h_ 419_ 35@http ://tools. jb51. net/jisuanqi/anjie_ calc

Scientific calculator Online_ Advanced calculator online calculation: @ h_ 419_ 35@http ://tools. jb51. net/jisuanqi/jsqkexue

Online calculator_ Standard calculator: @ h_ 419_ 35@http ://tools. jb51. net/jisuanqi/jsq

For more information about Java algorithms, readers who are interested can see the topics on this site: Java data structure and algorithm tutorial, summary of Java DOM node operation skills, summary of java file and directory operation skills, and summary of Java cache operation skills

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>