suresh kumar yadav
octal literal
0 Answer(s)      4 years and a month ago
Posted in : Java Beginners

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. }
Advertisement
View Answers









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
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
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. 
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 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
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
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
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
JavaScript Variables and Data types
; in a statement, it is called a literal value. For the same reason people are identified by names as opposed to "human" or "person", literal values can be named
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
question
question  Q2.WAP to convert a octal number into BCD
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
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
Variables
;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
Java basics - Java Beginners
literals in java program  Why we use literals in java program?  Hello,A literal is the source code representation of a fixed value... below, it's possible to assign a literal to a variable of a primitive type
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
Literals - Java Beginners
by a literal. Literals represent numerical (integer or floating-point... the same value throughout a program. But a literal is not a name -- it is the value itself. A literal can be a number, a character, or a string. For example
Java - Java Beginners
until the program execution. Literal : Literal is used for giving the value to a variable of any data type may be string , integer , float etc . Literal... the literals .Literal declaration like this :int age = 20 ; // integer literalfloat
Java String Datatype
like String str="hello", they are referred as String literal and String literals