0
Please why is it when am creating a code using strings it gives me 'no output'
like I want to write my name is 'fakorede damilola' it not through input just normal coding and output
8 Answers
+ 5
// Use a lowercased C for class keyword.
public class program {
public static void main(String[] args){
String firstName, lastName;
firstName = "Damilola";
lastName = "Fakorede";
System.out.println("My name is " + firstName +" "+lastName);
}
}
+ 3
Look at your variable names. In String name, you have fistname, but when you try to output it, you write firstName. difference is n-N.
firstname
firstName
+ 2
Oh yes, that's what I missed
+ 2
Ooh thanks a lot...hope am not bothering cause I have a big feeling the questions are going to keep coming
+ 2
We are here to help :)
+ 1
Post your code so we can help and find problem
+ 1
public Class program {
public static void main(String[] args){
String firstname, lastname;
firstname = "Damilola";
lastname = "Fakorede";
System.out.println("My name is " + firstName +" "+lastName);
}
}
0
thank you but I have changed the N-n and I checked there is no fistname there they are both correct in spelling and all
but it is not still working still 'no output'