Click here to Skip to main content
15,867,704 members
Home / Discussions / Java
   

Java

 
AnswerRe: Hi guys my code is not compiling as its showing cannot find symbol please help Pin
zemiak1231-May-22 13:06
zemiak1231-May-22 13:06 
QuestionDevelopment of Wiki functionality in JSF project Pin
Dev Learning22-Apr-22 2:25
Dev Learning22-Apr-22 2:25 
QuestionRelated to resolve my error(Rearranging an array) Pin
Prateek Bajpai10-Apr-22 4:49
Prateek Bajpai10-Apr-22 4:49 
AnswerRe: Related to resolve my error(Rearranging an array) Pin
Richard MacCutchan10-Apr-22 5:53
mveRichard MacCutchan10-Apr-22 5:53 
QuestionHOW TO USE JTABLE TO DISPLAY ALL RECORDS DATA FROM DATABASE USING JDBC Pin
Member 1558267928-Mar-22 21:48
Member 1558267928-Mar-22 21:48 
AnswerRe: HOW TO USE JTABLE TO DISPLAY ALL RECORDS DATA FROM DATABASE USING JDBC Pin
Richard MacCutchan29-Mar-22 1:31
mveRichard MacCutchan29-Mar-22 1:31 
GeneralRe: HOW TO USE JTABLE TO DISPLAY ALL RECORDS DATA FROM DATABASE USING JDBC Pin
Member 155826795-Apr-22 21:49
Member 155826795-Apr-22 21:49 
QuestionWhiteSpace Character Pin
Sudhanshu_India5-Mar-22 23:26
Sudhanshu_India5-Mar-22 23:26 
public class JavaCharacterisWhitespaceExample_1 {
public static void main(String[] args) {
// Initialize three codepoints: cp1, cp2 and cp3
int cp1 = 49;
int cp2 = 121;
int cp3 = 234;
// Check whether the codepoints are whitespaces or not.
boolean check1 = Character.isWhitespace(cp1);
boolean check2 = Character.isWhitespace(cp2);
boolean check3 = Character.isWhitespace(cp3);
// Print the result.
if(check1){
System.out.print("The codepoint \'"+cp1+"\' is a whitespace character.\n");
}
else{
System.out.print("The codePoint \'"+cp1+"\' is not a whitespace character.\n");
}

if(check2){
System.out.print("The codepoint \'"+cp2+"\' is a whitespace character.\n");
}
else{
System.out.print("The codePoint \'"+cp2+"\' is not a whitespace character.\n");
}

if(check3){
System.out.print("The codepoint \'"+cp3+"\' is a whitespace character.\n");
}
else{
System.out.print("The codePoint \'"+cp3+"\' is not a whitespace character.\n");
}
}
}


Output:
-----------

The codePoint '49' is not a whitespace character.
The codePoint '121' is not a whitespace character.
The codePoint '234' is not a whitespace character.
--------------------------------------------------------------------------------------------------------





public class JavaCharacterisWhitespaceExample_2 {
public static void main(String[] args) {
// Initialize three codepoints: cp1, cp2 and cp3
int cp1 = 9;
int cp2 = 10;
int cp3 = 13;
// Check whether the codepoints are whitespaces or not.
boolean check1 = Character.isWhitespace(cp1);
boolean check2 = Character.isWhitespace(cp2);
boolean check3 = Character.isWhitespace(cp3);
// Print the result.
if(check1){
System.out.print("The codepoint \'"+cp1+"\' is a whitespace character.\n");
}
else{
System.out.print("The codePoint \'"+cp1+"\' is not a whitespace character.\n");
}

if(check2){
System.out.print("The codepoint \'"+cp2+"\' is a whitespace character.\n");
}
else{
System.out.print("The codePoint \'"+cp2+"\' is not a whitespace character.\n");
}

if(check3){
System.out.print("The codepoint \'"+cp3+"\' is a whitespace character.\n");
}
else{
System.out.print("The codePoint \'"+cp3+"\' is not a whitespace character.\n");
}
}
}


Output:
-----------

The codepoint '9' is a whitespace character.
The codepoint '10' is a whitespace character.
The codepoint '13' is a whitespace character.


My Question is why 9,10 & 13 are whitespace characters while 49, 121,234 are not, though all of them are number?
AnswerRe: WhiteSpace Character Pin
Richard MacCutchan6-Mar-22 1:22
mveRichard MacCutchan6-Mar-22 1:22 
GeneralRe: WhiteSpace Character Pin
Sudhanshu_India7-Mar-22 15:04
Sudhanshu_India7-Mar-22 15:04 
GeneralRe: WhiteSpace Character Pin
Victor Nijegorodov7-Mar-22 20:12
Victor Nijegorodov7-Mar-22 20:12 
GeneralRe: WhiteSpace Character Pin
Richard MacCutchan7-Mar-22 21:16
mveRichard MacCutchan7-Mar-22 21:16 
GeneralRe: WhiteSpace Character Pin
Sudhanshu_India8-Mar-22 3:45
Sudhanshu_India8-Mar-22 3:45 
GeneralRe: WhiteSpace Character Pin
Dave Kreskowiak8-Mar-22 4:47
mveDave Kreskowiak8-Mar-22 4:47 
GeneralRe: WhiteSpace Character Pin
Sudhanshu_India8-Mar-22 14:54
Sudhanshu_India8-Mar-22 14:54 
GeneralRe: WhiteSpace Character Pin
Victor Nijegorodov8-Mar-22 4:55
Victor Nijegorodov8-Mar-22 4:55 
GeneralRe: WhiteSpace Character Pin
Craig Robbins8-Mar-22 5:01
Craig Robbins8-Mar-22 5:01 
QuestionJava Pin
GJ AVAIYA5-Mar-22 7:51
GJ AVAIYA5-Mar-22 7:51 
AnswerRe: Java Pin
Dave Kreskowiak5-Mar-22 10:29
mveDave Kreskowiak5-Mar-22 10:29 
AnswerRe: Java Pin
Richard MacCutchan5-Mar-22 21:17
mveRichard MacCutchan5-Mar-22 21:17 
QuestionJAVA_REGEX_WHITESPACE _CHARACTER Pin
Sudhanshu_India1-Mar-22 15:01
Sudhanshu_India1-Mar-22 15:01 
AnswerRe: JAVA_REGEX_WHITESPACE _CHARACTER Pin
Richard Deeming1-Mar-22 21:38
mveRichard Deeming1-Mar-22 21:38 
GeneralRe: JAVA_REGEX_WHITESPACE _CHARACTER Pin
Sudhanshu_India2-Mar-22 0:43
Sudhanshu_India2-Mar-22 0:43 
GeneralRe: JAVA_REGEX_WHITESPACE _CHARACTER Pin
Richard Deeming2-Mar-22 2:06
mveRichard Deeming2-Mar-22 2:06 
GeneralRe: JAVA_REGEX_WHITESPACE _CHARACTER Pin
Sudhanshu_India2-Mar-22 14:28
Sudhanshu_India2-Mar-22 14:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.