Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


ahshan
datatype
2 Answer(s)      4 years and 11 months ago
Posted in : Java Beginners



Advertisement
View Answers

August 18, 2009 at 12:41 PM


Hi Friend,

Try the following code:

import java.io.*;

public class Convert{
public static void main(String args[])throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter a Character:");
char c = ' ' ;
try
{
c = (char)br.read() ;
}
catch(Exception e){}
System.out.println("Character value is " + c);
String st = Character.toString(c);
System.out.println("String value is " + st);
}
}

Thanks


August 19, 2009 at 5:18 PM



Hi,

Consider your character var as 'a'.. Then the code to convert it to string would be:


char a;
String s = Character.toString(a);



regards,


Related Tutorials/Questions & Answers:
Datatype convertion
Datatype convertion  it possible to convert long datatype into string in java if possible means how
Boolean DataType
Boolean DataType  What is the Size of the Boolean datatype in Java
Advertisements
Java Datatype
Java Datatype  What will be the output of following java program and why? class Datatype{ public static void main(String[] args.... Therefore it displays its corresponding integer value. class Datatype{ public
Java Datatype
Java Datatype  What will be the output of following java program and why? class Datatype{ public static void main(String[] args.... Therefore it displays its corresponding integer value. class Datatype{ public
Java Primitive Datatype
Java Primitive Datatype  what is the size of boolean datatype ? please explain in detail
Writing a trigger for an userdefined datatype
Writing a trigger for an userdefined datatype  i have a user defined datatype in EMP table like COLUMNNAME:ADDRS_TYPE where ADDRS_TYPE have the following columns DATATYPE :ADDRESS VARCHAR2(136) V_CODE VARCHAR2(8) T_CODE
datatype - Java Beginners
datatype  how i convert char datatype in string format for ex.(convertion of int datatype) int variable_name=Integer.parseInt(br.readLine());  Hi Friend, Try the following code: import java.io.*; public class
Java String Datatype
Java String Datatype  Weather String in java is class or Datatype,if it's clss then How can i assign String str="hello";   String is a class found in the package java.lang.*. When we represent string in double quotes
Mysql Alter Column Datatype
Mysql Alter Column Datatype       Mysql Alter Column Datatype is used to modify the table and change the datatype of field. Understand with Example The Tutorial illustrate
Mysql Decimal Datatype
Mysql Decimal Datatype       Mysql Decimal Datatype is used to specify the numeric values. Understand with Example The Tutorial give you an example from 'Mysql Decimal Datatype
Mysql nchar Datatype
Mysql nchar Datatype       MySQL nchar define the datatype nchar that stores fixed-length character data. The data can be a string single-byte or multibyte letters, digits
how to use float datatype in mysql? - SQL
how to use float datatype in mysql?  how to use float datatype in mysql?  hi Chitra this code help u CREATE TABLE `paging` ( `Id` float(10,2) NOT NULL default '0.00', `name` varchar(255) default NULL
SQL Decimal
SQL Decimal       SQL Decimal is used to specify the values in decimal datatype. The Decimal datatype can be of two types : Decimal (p) refers to floating point and Decimal fixed
Java Methods
Java Methods       JavaScript type of Operator The JavaScript type of operator returns the datatype of an operand. You can see in the given example
Data Type: bool
Data Type: bool       This Example shows you how to use bool datatype in velocity. Methods... a boolean datatype variable. $bool: Display boolean datatype variable
Mysql Alter Data Type
datatype in a table. Understand with Example The Tutorial cover an example... 'userform' with required fieldname and datatype respectively.The table 'userform' has...; column datatype from "contact( bigint)" to contact(varchar(130). 
MySQL nchar
MySQL nchar       MySQL nchar define the datatype nchar that stores fixed-length character data. The data can be a string single-byte or multibyte letters, digits and symbols
Java - Arithmetic Operation, Conversion and Casts in java
Java - Arithmetic Operation, Conversion and Casts in java       This example illustrates that what is type casting? Type Casting  refers to changing an entity of one datatype
Mysql Table Describe
Mysql Table Describe       Mysql Table Describe is used to describe the Fieldtype, Datatype, Null and Key etc of the table. Understand with Example The Tutorial illustrate
Mysql Alter Column
the datatype of existing column. Understand with Example The Tutorial illustrate... Column', we create a table 'employee1' with required fieldname and datatype... (0.00 sec) Query to view datatype of  Table named
Mysql Create Table
. To grasp this example, we create a table 'Stu' with required fieldname and datatype
Mysql Date Search
Mysql Date Search       In this Tutorial you will learn how to' search Date in Mysql'. To understand this example, we create a table 'employee' with required fieldname and datatype
JavaScript type of Operator
JavaScript type of Operator       The JavaScript type of operator returns the datatype of an operand. You can see in the given example that we have used different variables
PHP Type Hinting
. If the datatype (class or array) of actual argument does not match with the formal argument
PHP Sort Array
PHP Sort Array: Sometimes we need to store data in a single entity called Array, unlike in other language in PHP, an array can store values of different datatype. In the following examples we will learn how to create array, associative
Roshni
Datatype in SQL  when we want store image which datatype is used in mysql?   You can use blob, longblob datatype to store image into mysql database. Java Store Image into MySQL
Roshni
MYSQL datatype to store image into database  when we want store image which datatype is used in mysql?   You can use blob, longblob datatype to store image into mysql database. Java Store Image into MySQL
Roshni
Datatype for image in SQL  when we want store image which datatype is used in mysql?   You can use blob, longblob datatype to store image into mysql database. Java Store Image into MySQL
java
java  how to identify method,attribute,variable,datatype,object in java program?give the explanation with program
Roshni
Store Image into Database  when we want store image which datatype is used in mysql?   You can use blob, longblob datatype to store image into mysql database. Java Store Image into MySQL
Roshni
Database to store image  when we want store image which datatype is used in mysql?   You can use blob, longblob datatype to store image into mysql database. Java Store Image into MySQL
How to store an image in database
How to store an image in database  Hi........... How to store an image in postgresql using a query. I mean tell me the way to store an image using datatype. I am using the datatype bytea but tell me how to insert the image
Database
Database  i want to store the uploaded video and image for this which datatype we want to use in creation of the table in MySQL   You have to use 'longblob' datatype CREATE TABLE `file
Oracle BLOB
Oracle BLOB  Can anyone send me the code for inserting an image or audio into the oracle database using BLOB datatype. Plz...it's useful for my project
jdbc
jdbc  if i create one table that consist of usename ,joiningdate for joining date i have used varchar datatype not date . then we store date into database table as a string by using java .then what are the drawbacks
abt the bank application
abt the bank application  pls can u send to me the user table and transaction table sql statement with their datatype used in this bank application to my email
image display - JSP-Servlet
image display  how to display image that store in mysql database... column have BLOB datatype....  Hi Friend, Please visit the following link: http://www.roseindia.net/jsp/retrieve-image.shtml Thanks
Servlet and Jsp - JDBC
,which has the two fields 1.aa =fieldname datatype double ,it holds the double value and pk is not there. 2.bb =fieldname datatype double. second one is testtable,which has the two fields 1.testaa =fieldname datatype double.Initially
HIiiiiiiii - Java Beginners
datatype definition... look at the part of the code given ..... while(rst.next...;% } here u must give the correct datatype according to each column of ur table...? 6th varchar? 7th int? you must give the correct datatype according
Resize image stored in database
Resize image stored in database  hi, Can any one please send code for how to resize image stored in database in blob datatype in jsp, i want to resize it to 140(w)*160(h) please help me
releated to project
releated to project  hi hostel management is my project please send me code for showing data and "date" type datatype is not taken by oracle 10g .we use javanetbeans and oracle 10g how i can solve our problem
releated to project
releated to project  hi hostel management is my project please send me code for showing data and "date" type datatype is not taken by oracle 10g .we use javanetbeans and oracle 10g how i can solve our problem
releated to project
releated to project  hi hostel management is my project please send me code for showing data and "date" type datatype is not taken by oracle 10g .we use javanetbeans and oracle 10g how i can solve our problem
releated to project
releated to project  hi hostel management is my project please send me code for showing data and "date" type datatype is not taken by oracle 10g .we use javanetbeans and oracle 10g how i can solve our problem
upload image to database
upload image to database  i am try to upload image to MySql database using netbeans. when jsp execute it return no error. but also data does inserted in database. i am using blob datatype and preopared statement
java servlet programming - JSP-Servlet
in the column of datatype binary
What is ROWID?
of the Oracle ROWID datatype. It is intended to be immutable. The user should not try
Error - Development process
of datatype. If you have done any modification, then send it. Thanks
how to insert date&time coloumn value in mssql - JDBC
date&time coloumn values in mssql  hello, in My sql there is a datatype "date" and "time". create a field which have date datatype in this u can store date and for time create a field which have time datatype in this u can store time
Advertisements
 

 

 

DMCA.com