Home Discussion Discuss: Java Conversion

  • how to convert string to interger ...zuraida June 22, 2011 at 3:37 PM

    String datas = t1.getText(); String[] args=datas.split(" "); t2.append("Input arguments:\n"); // reads the command line options for (int i=0;i<args.length;i++) { if (args[i].equals ("-i")) { String data_str = new String(); // specify data values if (i+1<args.length) { i++; /* { public static void main(String[] args) System.out.println("Data types conversion example!"); int i = 50; //integer to binary String by = Integer.toBinaryString(in); System.out.println("Byte: " + by); }*/ t2.append("Parameter =>"+ args[i] +"\n"); data_str = args[i]; } // assign data values automatically to data by commas StringTokenizer s = new StringTokenizer (data_str,","); // count parameter int p = data_str.replaceAll("[^,]","").length(); p++; // as an array size data = new int [p]; int k =0; while (s.hasMoreTokens()) { data[k]=Integer.parseInt(s.nextToken()); k++; } } it's right or wrong... example : input A B C D as a 0 1 2 3 and do pairwise 01, 02, 03 and so on.... means 01 is AB, 02 is AC and so on... i want to convert 01,02,03 and so on as a binary number such as...AB is 1100, AC is 1010...and so on

  • Computer ScienceR Logarajah August 18, 2011 at 3:14 PM

    easy to understand this program and very well above this program modification to stack,queue

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Java Beginners

conversion
 

Java Beginners

conversion
 

Applet Questions

conversion Applet
conversion Applet  I am a java beginner.................. strong texthow to create JApplet that prompts the user to enter a distance in miles in a JTextField and then converts mile to kilometers and display the result as XX.XX 

JSP Servlet Questions

currency conversion
currency conversion   hi frds.. I wan jsp code to convert currency in different formats??... if u know plz plz plz post it   Please visit the following link: http://www.roseindia.net/tutorials/I18N/currency 

Java Beginners

java conversion
java conversion  how do i convert String date="Aug 31, 2012 19:23:17.907339000 IST" to long value 

Java Beginners

Language Conversion
Language Conversion  write a java program to convert "Hello World" in spanish 

Java Beginners

html2xml conversion
html2xml conversion  java code to convert html file to xml 

JavaScript Questions

javascript conversion
 

Java Beginners

String conversion
 

Java Beginners

image conversion tools
image conversion tools  how many tools are available in image conversion at particularlly in java 

Java Interview Questions

.wav file conversion
.wav file conversion   how to read .wav file and converd the data into text format 

Struts Questions

conversion of language in a project
conversion of language in a project  how can we convert the database code in the project dynamically 

JavaScript Questions

Number conversion in JavaScript
Number conversion in JavaScript  How do you convert numbers between different bases in JavaScript 

Mobile Applications Questions

NSString to float conversion
NSString to float conversion  HI, I my iPhone and iPad application I have to convert NSString to float. Provide me example of NSString to float conversion. Thanks   Hi, Please see NSString to float conversion 

Java Beginners

object conversion - Java Beginners
/java-conversion/ObjectToDouble.shtml Thanks... sandeep kumar suman...object conversion   Hi, Can anybody tell me the object conversion in java.   Hi sandeep Can u please tell me in details about your 

Development process Questions

Conversion - Development process
Conversion  Why is there a need to convert from Java to .NET? What is the theory of conversion from java to .NET? How it is done?   Hi... Conversion Assistant (JLCA). Code that calls Java APIs can convert to comparable C# code 

Mobile Applications Questions

NSString to float conversion
NSString to float conversion  HI, I my iPhone and iPad application I have to convert NSString to float. Provide me example of NSString to float conversion. Thanks   HI, Use the following code: NSScanner *strXpos 

Java Beginners

Type Conversion - Java Beginners
for conversion 

Java Beginners

Conversion of String to Integer
Conversion of String to Integer  public class Test { public static void main(String[] args) { int countA = 0; int countB = 0; int countC = 0; int countD = 0; int countE = 0; int 

JavaScript Questions

javascript integer to string conversion
javascript integer to string conversion  How to Javascript Integer to String Conversion   <script type="text/javascript"> /** * print out the value and the type of the variable passed 

Java Beginners

Java Conversion Question - Java Beginners
Java Conversion Question   Hello sir ,How i can Convert Java Code to Vb.net ,Plz Help Me 

Java Beginners

Distance conversion - Java Beginners
Distance conversion  Write an application that reads a distance in metres. The program will then present a user menu of conversion types, converting the distance to kilometres, feet and inches, according to the user?s selection 

Core Java Tutorials

Data Conversion from double to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from double primitive type to another data type like String, boolean and char etc 

Core Java Tutorials

Data Conversion from long to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from long primitive type to another data type like String, boolean and char etc 

Core Java Tutorials

Data Conversion from float to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from float primitive type to another data type like String, boolean and char etc 

Core Java Tutorials

Data Conversion from short to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from short primitive type to another data type like String, boolean and char etc 

Core Java Tutorials

Data Conversion from byte to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from byte primitive type to another data type like String, boolean and char etc 

Core Java Tutorials

Data Conversion from int to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from int primitive type to another data type like String, boolean and char etc 

Core Java Tutorials

Data Conversion from String to another type
Data conversion is the conversion of data from one type to another type. In this section we will learn about data conversion from String primitive type to another data type like int, boolean and char etc 

Java Beginners

Excel conversion tool. - Java Beginners
Excel conversion tool.  Hi, I need a conversion tool which can convert .xls(Excel 2003) to .xlsx (Excel 2007) and vice-versa. Please suggest any links ro tools. Thank You 

DMCA.com