java separator是什么?让我们一起来了解一下吧!
java separator是java程序中的分隔符。Separatror的作用是分开应用程序用户界面的元素信息,它没有可能产生任何操作。
垂直和水平分隔符
//Horizontal separator Separator separator1 = new Separator(); //Vertical separator Separator separator2 = new Separator(); separator2.setOrientation(Orientation.VERTICAL);
这个Separator属于扩展Node类。所以,分隔符继承Node该类的所有实例变量。
Java使用Separator替代符号拼接,源代码如下:
/**
* The FileSystem object representing the platform's local file system.
*/
private static final FileSystem fs = DefaultFileSystem.getFileSystem();
/**
* The system-dependent default name-separator character. This field is
* initialized to contain the first character of the value of the system
* property file.separator. On UNIX systems the value of this
* field is '/'; on Microsoft Windows systems it is '\\'.
*
* @see java.lang.System#getProperty(java.lang.String)
*/
public static final char separatorChar = fs.getSeparator();
/**
* The system-dependent default name-separator character, represented as a
* string for convenience. This string contains a single character, namely
* {@link #separatorChar}.
*/
public static final String separator = "" + separatorChar;以上就是小编今天的分享了,希望可以帮助到大家。