<link rel="stylesheet" href="https://js.how234.com/c359fc24b2/da53fe39b117d0455d01c0b110681d4466/da5ee921b51c/da42d322a20a.css" type="text/css" /><link rel="stylesheet" href="https://js.how234.com/c359fc24b2/da53fe39b117d0455d01c0b110681d4466/da5ee921b51c/da42c425b502dd685f0fcdad1b74.css" type="text/css" /><script type="text/javascript" src="https://js.how234.com/third-party/SyntaxHighlighter/shCore.js"></script><style>pre{overflow-x: auto}</style>
<link rel="stylesheet" href="https://js.how234.com/third-party/SyntaxHighlighter/shCoreDefault.css" type="text/css" /><script type="text/javascript" src="https://js.how234.com/third-party/SyntaxHighlighter/shCore.js"></script><script type="text/javascript"> SyntaxHighlighter.all(); </script>
java separator是什麼?讓我們一起來了解一下吧!
java separator是java程序中的分隔符。Separatror的作用是分開應用程序用戶介面的元素資訊,它沒有可能產生任何操作。
垂直和水平分隔符
//Horizontal separatorSeparator separator1 = new Separator();//Vertical separatorSeparator 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;