How can you take string into InputStream?
Answers were Sorted based on User's Feedback
Answer / sudhakar p
Step 1: Convert String to byte array
Step 2: Create a ByteArrayInputStream passing bytes[] to to
the contructor
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / 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 |
all are saying java doesn't support multiple inheritance but by default Object class is super class for all the user defined classes and we can extend atmost one class so each class can extend more than one class so java supports multiple inheritance?i am confused with this,pls any one explain me.
What is main method?
What are legal modifiers that we can use to declare an inner class?
Which java ide is used the most?
what is marker interface ? what is the necessity of it?
Why arraylist is used in java?
What is the difference between error and exception and explain in simple words not whatever is given in the book.
What is an Applet ?
What is the catch or declare rule for method declarations?
What is the basic functionality of DataOutput interface in java?
what is the difference between HashMap And HashTable?
Can we overload the methods by making them static?