java.lang.StringBuffer.setLength() 方法设置字符序列的长度。该序列被改变到一个新的字符序列的参数所指定的长度。
#java.lang.StringBuffer.setLength()方法的声明
#public void setLength(int newLength)
#参数newLength -- 这是新的长度
#返回值:此方法不返回任何值
#异常:IndexOutOfBoundsException -- 如果newLength参数是负
#实例:使用java.lang.StringBuffer.setLength()方法
package com.yiibai;
import java.lang.*;
public class StringBufferDemo {
public static void main(String[] args) {
StringBuffer buff = new StringBuffer("tutorials");
System.out.println("buffer1 = " + buff);
// length of stringbuffer
System.out.println("length = " + buff.length());
// set the length of stringbuffer to 5
buff.setLength(5);
// print new stringbuffer value after changing length
System.out.println("buffer2 = " + buff);
// length of stringbuffer after changing length
System.out.println("length = " + buff.length());
}
}
#编译和运行上面的程序,这将产生以下结果:
buffer1 = tutorials
length = 9
buffer2 = tutor
length = 5
多线程:
https://www.cnblogs.com/wxd0108/p/5479442.html
利用Gradle的productFlavors使用应用多现场配置
https://blog.youkuaiyun.com/zz6880817/article/details/79449465
关于RecyclerView
https://www.jianshu.com/p/aff499a5953c
https://blog.youkuaiyun.com/briblue/article/details/70161917
RecyclerView探索之通过ItemDecoration实现StickyHeader效果
https://blog.youkuaiyun.com/briblue/article/details/70211942
跑马灯
<TextView
android:id="@+id/pass_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/general_title_margin_top"
android:background="#22193459"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:marqueeRepeatLimit="marquee_forever"
android:paddingLeft="@dimen/general_list_margin"
android:paddingRight="@dimen/general_list_margin"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="#FF9C56"
android:textSize="@dimen/general_list_item_callinfo_text_size" />
实战篇ConstraintLayout的崛起之路
https://www.jianshu.com/p/a74557359882
安卓编译错误app:compileDebugJavaWithJavac>Compilation failed; see the compiler error output for details.
https://blog.youkuaiyun.com/Daxue_haha/article/details/78605047
android开发规范文档
https://blog.youkuaiyun.com/wangkuan219/article/details/52576762
浮点数的二进制表示
http://www.ruanyifeng.com/blog/2010/06/ieee_floating-point_representation.html
http://www.cnblogs.com/n-u-l-l/archive/2012/05/12/2497063.html
https://blog.youkuaiyun.com/u011362822/article/details/30245967