首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

轨范注释的说明形式和位置、@param参数、<pre>源代码示例

2012-11-03 
规范注释的说明形式和位置、@param参数、pre源代码示例/**?* Returns a string that is formatted accordi

规范注释的说明形式和位置、@param参数、<pre>源代码示例

/**
?
* Returns a string that is formatted according to the justification type and the
?* specified width.? If the width is less than the length of the string, returns
?* a string of stars (*) whose length equals the width.
?* @param??? leftRight the type of justification ('l', 'c', or 'r').
?* @param??? str the string to be formatted.
?* @param??? width the number of columns in which the string is placed.
?* Examples:
?* <pre>
?*
?*?? String right = Format.justify('l', "Hi", 4);
?*?? String left = Format.justify('c', "Hi", 4);
?*?? String center = Format.justify('r', "Hi", 4);
?*?? String noChange = Format.justify('r', "Hi", 2);
?*?? String tooFew = Format.justify('r', "Hi", 1);
?*
?*?? left now refers to????? "Hi? "
?*?? center now refers to??? " Hi "
?*?? right now refers to???? "? Hi"
?*?? noChange now refers to? "Hi"
?*?? tooFew now refers to??? "**"
?* </pre>
?*/

热点排行