餵我想爲Char類,它作爲Char.IsDigit()方法(當然這會認識到一個不同的充類型的字符)創建一個擴展方法。 我寫了這個: namespace CharExtensions
{
public static class CompilerCharExtension
{
public static Boolean IsAddOp(this Char c)
我明白當你寫的內存的一部分,你沒有自己發生Abort trap 6,但我意識到一些有趣的事情,而這樣做ķ& [R演習。 /* strcat: copies t to the end of s */
void _strcat(char *s, char *t) {
while (*s != '\0') {
s++;
}
while ((*s++ = *t+
我有一個方法可以檢查用戶是否是學生,但我無法驗證條件。 char custStud = '0';
Scanner input = new Scanner(System.in);
do{
System.out.println("Are you a student? (Type Y or N): ");
custStud = input.next().charAt(0);