suresh kumar yadav
octal literal
0 Answer(s)      a year and 11 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. }
View Answers









Related Pages:
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
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. 
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
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
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
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
Regex Literal Characters
Java: Regex Literal Characters [SERIOUSLY UNDER CONSTRUCTION] Most characters can simply be written directly in a regular expression because they're easy to write in a Java string and they have not special meaning to the regular
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
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
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
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
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:  
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
Java Programming: Section 2.2
it an octal literal, as in 045 or 077. A hexadecimal literal begins with 0x or 0X, as in 0x45 or 0xFF7A. By the way, the octal literal 045 represents the number... for a constant value is called a literal. A literal is what you have to type
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
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
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
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 - Java Beginners
java  whats the diffrence between an object and variables?  Hi Friend, A variable holds a single type of literal. i.e. 1, hello whereas an object is a instance of a class created by a programmer with a set of methods
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
PHP Integer Data Type
Learn PHP Integer Data type: In PHP integers can be decimal which is a normal number we use in our daily life (base of this number system is 10), an octal... system is 16). To denote an octal number in PHP use 0 before the number
java programing - Java Beginners
;Manually convert an integer into BINARY, HEXADECIMAL, and OCTAL............Java Example... to Octal:=" + str
Maximum Solutions - Specialists in Object Orientation
): public interface StaticFinalTest { String LITERAL = "Literal"; String LITERAL_PLUS = "Literal" + "Plus"; String LITERAL_NEW = new String("LiteralNew"); String LITERAL_CONCAT = "
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
java Compilation error:jsp code - JSP-Servlet
java Compilation error:jsp code   I am getting an Generated Servlet error: String literal is not properly closed by a double-quote. here is my..., You haven't closed the string literal properly,therefore error occurs.In
MySQL BIT
MySQL BIT This example illustrates how to create the table with BIT type field. In this example we create a table with BIT type field and insert some binary value and then select the table as binary, octal and hexadecimal format
core java - Java Interview Questions
literal not a statement illegal character identifier expected Thanks
STRING IMMUTABLE - Java Interview Questions
a new string literal, it has to be checked in the pool whether it exists
java - Java Interview Questions
e) thisisCrazy 7. Represent the number 6 as a hexadecimal literal
String Ques
)String str = abc is a String literal where as String str = new String("abc
The false Keyword
. The syntax of declaring a boolean type variable having false literal
Regular expression summary
with octal value 0n (0 <= n <= 7) \0nn The character with octal value 0nn (0 <= n <= 7) \0mnn The character with octal value 0mnn (0 <= m 
Beginners Java Tutorial
programming.    Java - Variable, Constant and Literal in Java... type data into binary, octal and hexadecimal In this section, you will learn how to convert an integer type data into binary, octal and hexadecimal. The 
new String(text) - Java Beginners
) memory, and this.text will refer to it. In addition, the literal text
solllll - Java Beginners
solllll  Correct the insert query and send me give error "Unclosed character literal" please solve it and send me currently Qry="insert into ConDetailspopup (FORMID,NAMEOFCONT,NUMOFCONLABENG,CONPERFORMDATE,CONTPERTODATE,PONUM
java compilation error - Java Beginners
java compilation error  I need to know how to correct a compiler error for my program to run. The error I keep getting is unclosed string literal. The code it's firing on looks like this public String toString() { return

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.