Ask a Question | Answer a Question! |
Submitting your question...
ResFinder - Thousands of Practice Papers
Plz point out my mistake in the prog.:
import java.io.*;
class FruitJuice
{
int product_code,pack_size,product_price;
String flavour,pac_type;
FruitJuice()
{
product_code=0;
pack_size=0;
product_price=0;
flavour="";
pac_type="";
}
void input()throws IOException
{
BufferedReader inp=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter pcode psize pprice flavour pactype");
product_code=Integer.parseInt(inp.readLine());
pack_size=Integer.parseInt(inp.readLine());
product_price=Integer.parseInt(inp.readLine());
flavour=inp.readLine();
pac_type=inp.readLine();
}
void discount()
{
product_price=product_price-10;
}
void display()
{
System.out.println("P code="+product_code);
System.out.println("P size="+pack_size);
System.out.println("P price="+product_price);
System.out.println("Flavour="+flavour);
System.out.println("P type="+pac_type);
}
public static void main(String args[])
{
FruitJuice ob=new FruitJuice();
ob.input();
ob.discount();
ob.display();
}
} |
|
asked by Aavesh Kumar (aavesh) 8 years ago |
1 |
The function of try block and catch block
Please answer fast |
|
asked by Ankit kumar (yobro99) 8 years ago |
1 |
GUYS WHAT PLANS FOR TOMORROW???😜😜😜 |
|
asked by Sidra Haider (sidrahaider) 8 years ago |
2 |
Say what you want but to me,
Watson is one of a kind.
He is the best there was, the best there is and the best there will ever be |
|
asked by Saahil Sankar B (bestintheworld) 8 years ago |
1 |
+ 9 more questions by bestintheworld
ATB to all of you idiots XD
But the fact is the match was fixed |
|
asked by Saahil Sankar B (bestintheworld) 8 years ago |
0 |
I refuse to shut up until you aceept that the match was fixed and that Watson is better than Dhoni |
|
asked by Saahil Sankar B (bestintheworld) 8 years ago |
1 |
So all of you have accepted defeat?
See, the the best in the world alone defeated everyone in this group
Because I am the Best In the world |
|
asked by Saahil Sankar B (bestintheworld) 8 years ago |
0 |
Rajasthan Royals>>>>>>>>>>All other teams + Idian cricket team |
|
asked by Saahil Sankar B (bestintheworld) 8 years ago |
0 |
Watson>>>>>>>>>>>>IndianCricket team |
|
asked by Saahil Sankar B (bestintheworld) 8 years ago |
0 |
So the fact is,
I'm the only person here who has the guts to say what is right rather that what everyone wants to hear |
|
asked by Saahil Sankar B (bestintheworld) 8 years ago |
4 |
You have no right to do this
I have the right to express my opinion without compulsion or restraint of any kind |
|
asked by Saahil Sankar B (bestintheworld) 8 years ago |
4 |
I am not a Pakistani.
I am an Indian and I am proud to be one.
But I am not proud of our cricket team |
|
asked by Saahil Sankar B (bestintheworld) 8 years ago |
3 |
If you drop Rohit and inclde Rahane you will know who is the real legend |
|
asked by Saahil Sankar B (bestintheworld) 8 years ago |
2 |
WE DON'T CARE.. YOU CAN CONTINUE.. IT TILL THE MORNING...
ALL THE BEST... xD |
|
asked by Siddharth Chhetri (dgenerationx) 8 years ago |
1 |
Respaper developers should rather try improving the site by creating a block option which would restrict a person's privileges of posting questions in groups like this....
All the very best GUYS for COMPUTER / ECONOMICS /COMMERCIAL APPLICATIONS etc..............Just rock it ...last one in the board..............#DOwell |
|
asked by MP Harsha (student58) 8 years ago |
1 | + 1 more questions by student58
yeah SAAHIL Sankar ko kisi ne accha sa dakshina-vakshina de diya hoga .......LOL xD |
|
asked by MP Harsha (student58) 8 years ago |
3 |
|
Not a cricket fan but someone here should just go to Australia |
|
asked by Vijay Kr
(krvijay28) 8 years ago |
3 |
watson succkks.
*grabs popcorn* |
|
asked by Yolomama69 (yolomama69) 8 years ago |
2 |
But i think today is our last chat here...will b missing u all guys...ATB for tmw and wish that evryone gets good marks overall.. |
|
asked by Ishanuj Hazarika (ishanuj99) 8 years ago |
4 |
|