Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1.)When we input data using ByteStream & write---> String s=xy.readLine(); int x

ID: 3553565 • Letter: 1

Question

1.)When we input data using ByteStream & write---> String s=xy.readLine();
int x=Integer.parseInt(s);

Can the 2nd line be called as TypeCasting since we are entering the data in the form of String & then converting it to integer type?

2.)Can't we convert a String type to an Integer type using the following command--->
String s="123";
int a=(int)s;
If no, please could you give the command?

3.)What is the difference b/w Packages & Inheritance?

4.)The last one-->could you please give me a link where JAVA definitions are given in detail ?

Explanation / Answer

Find the code here : http://ideone.com/a8NdKK

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote