octal literal

octal literal

in the following code how value of i and j will be 8 and 7.please explain.

  1. public class Test {
  2. public static void main(String[] args){
  3. int i = 010;
  4. int j = 07;
  5. System.out.println(i);
  6. System.out.println(j);
  7. }
  8. }
View Answers

Ads









Related Tutorials/Questions & Answers:
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
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
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
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
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
Convert Decimal to Octal
Convert Decimal to Octal       In this section, you will learn to convert decimal number into octal...) with base  10. The octal number has 8 digits (as: 0,1,2,3,4,5,6,7) with base 8
Convert Octal to Decimal
Convert Octal to Decimal       In this section, you will learn to convert an octal number to decimal. The following program helps you converts number octal to decimal. 
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
Convert integer type data into binary, octal and hexadecimal
Convert integer type data into binary, octal and hexadecimal... will learn how to convert an integer type data into binary, octal and hexadecimal... into binary, octal, and hexadecimal. The following program helps you to convert
Literal in Java
. They are in different forms like decimal , hexadecimal and octal. The decimal literal...Literal in Java In this section you will learn about literals in Java. "literal" is a constant value. A literal is a constant value that can
Mysql Date Literal
Mysql Date Literal      ... The Tutorial make you an easy example to understand the concept on 'Mysql Date Literal... in the national character set.The Syntax used for Date Literal in Mysql is given below
Java - Variable, Constant and Literal in Java
Java - Variable, Constant and Literal in Java  ... keyword. The values of the constant can't be changed once its declared. Literal : literal is an explicit number or string constant used in Java programs
WSDL program
WSDL program       Project Requirement Make a  project in Netbeans.Develop an Simple WSDL document in rpc/literal using... Binding type as SOAP Binding subtype as RPC Literal as shown
Image Size
associated with an object on the frame. Some images are either 'literal' images... the literal meaning of the worlds completely. Description of program:  
compilation error - Java Beginners
is the reason?  Hi Friend, In Java there are some specific literal representation for the variable values. For example : Decimal Literal( without any prefix e.g 10) Octal Literal( with prefix 0 e.g 010 ) Hexadecimal Literal
Java Literals
 057L  Octal integer literal of type long integer...; By literal we mean any number, text, or other information that represents a value..., we can specify any value as a literal such as an integer. This character
question
question  Q2.WAP to convert a octal number into BCD
Variables in Java
;Octal integer literal of type long integer  ... to the value "true". Literals By literal we mean any number, text... as a literal such as an integer. This character sequence will specify the syntax
Linux Programming
Linux Programming  1.Write a program that reads an integer by the user and displays it in octal (base 8): Enter an integer number between 0 and 32767: 2012 In octal, your number is: 3734 (Use the same input and output format
question
to any number system that is octal,binary,decimal,hexadecimal according to user's... System:\n1 for Octal\n2 for Binary\n3 for Decimal\n4 for Hexadeciaml"); sel=parseInt(sel); switch(sel){ case 1: if(type=="decimal"){ num=parseInt(num); var octal
Core Java Interview Question, Interview Question
. It range is 0 to 2^7-1 Question: What forms an integral literal can be Answer: decimal, octal and hexadecimal, hence example it can be 28, 034 and 0x1c
use is of 2
use is of 2  why we use 2 in "Integer.parseInt(str,2);" for binary to decimal conversion..??   ya i got it... because binary contain only two o and 1...so here use 2...same as octal has 8
unicode characters
in character literal char ch='\u000a'; ^ 1 error
unicode characters
in character literal char ch='\u000a'; ^ 1 error
unicode characters
in character literal char ch='\u000a'; ^ 1 error
The boolean Keyword
The boolean Keyword       The boolean Keyword in java avails one of the two values that are true and false. Java have the boolean type so literal values true and false. 
Java String Datatype
like String str="hello", they are referred as String literal and String literals
Literals in Jsp
string, that are written literally as part of a program code. A literal... in Jsp</title> </head> <BODY> <H1>Using a Literal

Ads