Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can you take string into InputStream?

Answer Posted / himanshu gupta

String str="";
int i=0
InputStream in=new FileInputStream("File url");

while((i=in.read())!=-1)
{
str=str+(char)i;
}
System.out.println(str);

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In java, what is the difference between method overloading and method overriding?

1167


Can you sort a string in java?

971


What is a method type?

1036


What are the six ways to use this keyword?

1112


What is constant in programming?

1179


What is append in java?

1236


How do generics work?

997


What is finalize method?

1196


Is 0 a real number?

1102


What are the access modifiers in java?

1094


Explain the importance of finally over return statement?

1110


What about method local inner classes or local inner classes in java?

1104


How do you implement tree mirroring in java?

1118


What is an object's lock and which object's have locks in java programming?

1106


Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?

1079