if I write
return channelName[channel];
it gives me compilation error. It says
required: String[]
found: String
Type: Posts; User: centralguide
if I write
return channelName[channel];
it gives me compilation error. It says
required: String[]
found: String
is it wrong?
but channelName is based on channel number. so I cannot put a fixed number.Are you talking about public String[] getChannelName() section? TelevisionApp program is controlling the value. Could you...
I have confusion with array. i thought this will return only one value of array.......so i should write like return channelName[]; ....could you please help me how to return one value of array ?
because if the channel number is 1, we want to display channel Name as "CBS". Since there are 10 channels that is why i am returning whole array using if statement. I dont know if that is the right...
I dont know how to return array in toString method
Also how do i print TV state On using toString method?
i am getting
TV set:
channel No: 0
Channel Name: j.lang.String.@4563467
volume: 0
this compiles but i am not getting right output.......this is the output that i was hoping but somehow it is not getting right......can someone help me what is the problem with my code.
public...
Thank you very much......it worked once i added .00...........You are a life saver.....thank you very much once again
Thank you for your reply......
I tried checking value using System.out.printf("%f",tax); and in all the place it shows 0.0000
I don't know what is the problem...This is my second time using...
//program to taxreturn
import java.util.Scanner;
public class TaxReturn
{
public static void main(String[] args)
{