Results 1 to 2 of 2
Thread: Byte class ?
- 07-20-2009, 03:27 PM #1
Member
- Join Date
- Jul 2009
- Posts
- 6
- Rep Power
- 0
- 07-20-2009, 03:34 PM #2
Hi,
Gothru Sun tutorial before writing the code.
Write comments what u want to acheive then ask doubts.See the corrected code below.Here Byte is class which is having parseByte method to convert the String arg to Byte arg.
Java Code:class Demo { public static void main(String[] args) { int a; byte b; //Got the String value and converted to int a = Integer.parseInt(args[0]); //Got the String value and converted to byte b = Byte.parseByte(args[1]); //Multiplied and displayed System.out.println("Result = "+(a*b)); } }Ramya:cool:
Similar Threads
-
TCP send byte
By Koren3 in forum NetworkingReplies: 4Last Post: 05-25-2009, 07:08 AM -
Byte Array
By sandor in forum New To JavaReplies: 12Last Post: 01-15-2009, 03:31 AM -
using Byte arrays
By mew in forum New To JavaReplies: 2Last Post: 01-30-2008, 03:54 AM -
int to byte
By ravian in forum New To JavaReplies: 1Last Post: 01-13-2008, 07:22 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks