character literal in octal format

Ads
 

character literal in octal format

class EscapeSequence1 {

public static void main(String args[]) {

char ch='\141'; //this works correctly

char ch2='\777'; //this line give compile time error listed below

System.out.println("ch is:"+ch);

System.out.println("ch2 is:"+ch2); }

}

output is:::..

javac EscapeSequence1.java

javac EscapeSequence1.java

Process started >>>

EscapeSequence1.java:6: error: unclosed character literal char ch2='\777'; //this line give compile time error listed below ^

EscapeSequence1.java:6: error: unclosed character literal char ch2='\777'; //this line give compile time error listed below ^

EscapeSequence1.java:6: error: not a statement char ch2='\777'; //this line give compile time error listed below ^

3 errors

<<< Process finished

View Answers

Ads









Related Tutorials/Questions & Answers:
character literal in octal format
character literal in octal format  class EscapeSequence1 { public...;>> EscapeSequence1.java:6: error: unclosed character literal char... ^ EscapeSequence1.java:6: error: unclosed character literal char ch2
octal literal
octal literal  in the following code how value of i and j will be 8 and 7.please explain. public class Test { public static void main(String[] args){ int i = 010; int j = 07; System.out.println(i); System.out.println(j
Advertisements
octal to binary
octal to binary  i want to know how to convert a octal to binary number   Here is a java example that converts octal to binary. import... InputStreamReader(System.in)); System.out.print("Enter octal number
ModuleNotFoundError: No module named 'literal'
ModuleNotFoundError: No module named 'literal'  Hi, My Python... 'literal' How to remove the ModuleNotFoundError: No module named 'literal... to install padas library. You can install literal python with following command
Java Convert Octal to Binary
Java Convert Octal to Binary In this tutorial, you will learn how to convert octal to binary. Java has provide different ways to change the number system of different numbers. You can convert and decimal to octal, decimal to binary
Literal in Java
. They are in different forms like decimal , hexadecimal and octal. The decimal literal... in hexadecimal, 014 in octal. Character Literals : A char is represented using character...Literal in Java In this section you will learn about literals in Java. "
ModuleNotFoundError: No module named 'dataframe-literal'
ModuleNotFoundError: No module named 'dataframe-literal'  Hi, My... named 'dataframe-literal' How to remove the ModuleNotFoundError: No module named 'dataframe-literal' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'dataframe-literal'
ModuleNotFoundError: No module named 'dataframe-literal'  Hi, My... named 'dataframe-literal' How to remove the ModuleNotFoundError: No module named 'dataframe-literal' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'ae-literal'
ModuleNotFoundError: No module named 'ae-literal'  Hi, My Python... 'ae-literal' How to remove the ModuleNotFoundError: No module named 'ae-literal' error? Thanks   Hi, In your python environment you
Character Class
Character Class  Character defines the forDigit();,digit()methods..how can these b used and wht is radix point signifies here...in the arguments of these two???..pls answer a code on this with radix .. are these methods also
ModuleNotFoundError: No module named 'unicode-string-literal'
ModuleNotFoundError: No module named 'unicode-string-literal'  Hi...: No module named 'unicode-string-literal' How to remove the ModuleNotFoundError: No module named 'unicode-string-literal' error? Thanks   Hi
underscore as character
underscore as character  how can i consider _ as a character instead of wildcard character? my problem is like this i have 20 records as follows manohar 1234455 manohar 453635 manohar 345454 manohar_1234455 now when i am
Character class
Character class   Character defines the forDigit();,digit()methods..how can these b used and wht does radix point signify here.i want to knw what basically radix is??here in the arguments of these two???because i tried runnin
How to convert entity character to html character
How to convert entity character to html character  How to convert entity character to html character
Wrapper Character class.
Wrapper Character class.  How do the methods 'isIndentifierIgnorable(ch)' and 'isISOControl(ch)' work?? while workin with 'Character' wrapper class...: This method returns true if the character may be part of a Unicode identifier; false
How to convert entity character to html character
How to convert entity character to html character  Please help me to "convert entity character to html character" in java. If possible please provide source code which take String as input and return as String
Character Wrapper Class.
Character Wrapper Class.  what are Mirrored Unicode Characters?? and whats the use of "isMirrored(ch);method ??.where ch is any character argument.... There are special characters in UNICODE to achieve the RTL. Such character is the Mirroring
character as command line arguments
character as command line arguments  public class testing { public static void main(String args[]) { char a; a=args[0]; System.out.println("character is:"+a); } } what will be the above program output
find the first character is vowel or not
find the first character is vowel or not  hi friend, can u plz send me javascript code for find the wether the first character is a vowel or not. 2) check wether the last character is same as the first character or not 3) check
password validation with special character
password validation with special character  how to validate password with special character using java script
How to display string or character
How to display string or character  how to print character or a word without using array concept
Character encoding problem with chinese language
Character encoding problem with chinese language  I have a issue with characters in chinese locale in java. Iam using eclipse IDE My code... formattedDate = new SimpleDateFormat("dd MMMM yyyy",Locale.CHINESE).format
JavaScript regex validate Character
Character.   <html> <head> <title>Character validation... Character value : "+name); return true; } alert("It is not valid character !"); return false; } </script> <
JavaScript regex validate Character
Character   <html> <head> <title>Character validation... Character value : "+name); return true; } alert("It is not valid character !"); return false; } </script> <
Character Directions in java
Character Directions in java  java 2,version 1.4 adds a method "getDirectionality();" , what is the use of this method ?   This method returns the Unicode directionality property for the given character. Character
J2ME count character into string
J2ME count character into string  i am new in J2ME, my problem is how to count character into number, i had been research google for almost 2 days... form which allow user to input character user input helloworld then press
Unknown Character set: 'utf8mb4'.
Unknown Character set: 'utf8mb4'.  While working on eclipse on an application that uses MySQL as the back end for the database, I was having error...: Unknown Character set: 'utf8mb4'. I'm using WAMPSERVER 2.2 and Eclipse
image format
image format  what are the different format available in image
image format
image format  what are the different format available in image
Removing character from a string in sql.
Removing character from a string in sql.  How to remove or replace character from a string
Find out last character of array
Find out last character of array  How we can find out the last character of array in java program

Ads