Share on Google+Share on Google+

suresh kumar yadav
octal literal
0 Answer(s)      5 years and 10 months 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. }

Ads

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
Tutorials   
Java Spring Hibernate Struts Training What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? neo4j-server.properties file location SASLError using PLAIN: not-authorized how to convert war file into .exe file using java code

Ads

 
Advertisement null

Ads