need to fix errors please help
it does have 2 errors what should i fix?
import java.io.*;
class InputName
static InputStreamReader reader = new InputStreamReader(system.in);
static BufferedReader input = new BufferedReader (reader);
public static void main(String[]args) throws Exception
{
String name1;
String name2;
System.out.println("please enter your name:");
name1= input.readline();
System.out.println("please enter your friend's name:");
name2= input.readline();
System.out.println("name1"+ "name2"+ are+ friends);
}
View Answers
August 23, 2012 at 5:08 PM
We have modified your code. Check it.
import java.io.*;
class InputName{
static InputStreamReader reader = new InputStreamReader(System.in);
static BufferedReader input = new BufferedReader (reader);
public static void main(String[]args) throws Exception {
String name1;
String name2;
System.out.println("please enter your name:");
name1= input.readLine();
System.out.println("please enter your friend's name:");
name2= input.readLine();
System.out.println(name1+" and "+name2+ " are friends");
}
}
Ads
Related Tutorials/Questions & Answers:
need to fix errors please help
need to
fix errors please help it does have 2
errors what should i
fix?
import java.io.*;
class InputName
static InputStreamReader reader = new...;
String name2;
System.out.println("
please enter your name:");
name1= input.readline
Need urgent help with C++ errors!
Need urgent
help with C++
errors! hi,
i'm new to C++ programming... don't know what to do.
Please help!!
#include<iostream.h>
void main()
{
cout<<"Can somebody
fix this?";
}
the
errors are listed as follows
Advertisements
need help please
need help please Dear sir, my name is logeswaran. I have a big problem that I can't find the solution for a program. How can I block a user from enter a page second time.
Please help me.
By the way I'm using Access database
need help...................please
need help...................please I have a problem in my JSP Coding... on this area.
Please help me.
By the way, I'm using access Database and JSP coding...("GET",url,true)
xmlHttp.send(null)
}
else{
alert("
Please Select Employee Id
i need a help in this please
i
need a
help in this please The factorial of a nonnegative integer n is written n! (pronounced â?? n factorialâ??)
and is defined as follows:
n!=n . (n-1) . (n-2) . .... . 1 (for values of n greater than or equal to 1) and
n!=1
Help please, some strange errors
Help please, some strange errors Sorry about this messy formatting... is causing that run-time
errors? Any kind of
help will be helpful to me. and let... this
errors so i have posted the whole program here. Here i tried to make the monopoly
Please help need quick!!! Thanks
Please help need quick!!! Thanks hey i keep getting stupid compile
errors and don't understand why. i'm supposed to use abstract to test a boat race...();
^
6
errors
any
help would be appreciated guys. Thanks so
Coding errors for printing function, please help
. Can someone
please take a look and
help me to
fix this. Although...Coding
errors for printing function,
please help Hello,
We, my...;
Please visit the following link:
http://www.roseindia.net/java/example/java
Need Help Like No one Else Please
Need Help Like No one Else
Please write a program that computes miles per gallon for an automobile. The program should ask for the beginning mileage first. For each fill-up, the program should ask for the mileage and number
beginner need help with online ordering program please
beginner
need help with online ordering program please I have created a program for an online ordering system and now have to add error handling and a few other things my teacher doesn't teach well is there a template I can go
Can any one please help me in this ,,,,,,, need java code for this ,,,,please anyone
Can any one
please help me in this ,,,,,,,
need java code for this ,,,,
please anyone The Airport Valet Parking Company (AVP) is a company which... information;
Bookings for the service
need to be made at least 1 day in advance
Need help
. This name list should get from the database.
Please help me.
By the way, I'm...
Need help Dear sir, I have a problem. How to write JSP coding, if a user select a value from drop down list for example department, the another drop
please help//
please help// Number square cube
1 1 1
3 9 27
5 25 125
7 49 343
9...
need program
class SquareAndCube
{
public static void main(String
please help//
please help// Number square cube
1 1 1
3 9 27
5 25 125
7 49 343
9...
need program
class SquareAndCube
{
public static void main(String
please help//
please help// Number square cube
1 1 1
3 9 27
5 25 125
7 49 343
9...
need program
class SquareAndCube
{
public static void main(String
Need help with this!
Need help with this! Can anyone
please help me... to a file at all at this time. Any
help would be greatly appreciated, thank you...
//Menu Option 1
if(entry == 1)
{
System.out.println("
Please enter the amount
please help
please help
please send me the code of dynamic stack in java without using the built in functions
please fix the error
please fix the error org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 14 in the jsp file: /doctor.jsp
Invalid character constant
11: Connection con
Need help
Need help Hello...
I
need some
help
I have a method which contains 1 string value and i wnat when this method get called den that string value should b assigned as array name..
for example..
i have a method name() which
Need help
Need help Hello...
I
need some
help
I have a method which contains 1 string value and i wnat when this method get called den that string value should b assigned as array name..
for example..
i have a method name() which
help please?
help please? Define a class named Circle with the following properties:
â?¢ An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both data fields
help please?
help please? Define a class named Circle with the following properties:
List item
â?¢ An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
help please?
help please? Define a class named Circle with the following properties:
List item
An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
help please?
help please? Define a class named Circle with the following properties:
List item
An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
help please?
help please? Define a class named Circle with the following properties:
List item
An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
please how fix this error?
How to
Fix Error
for this following code :
$var1 = $_POST["name"];
$var2 = $_POST["id"];
$st = 'INSERT INTO USERNAME(id,name) VALUES(:var1,:var2)';
$query = ociparse($con,$st);
OCIBindByName($st ,':va1',$var1
java please please help
java
please please help Dear Friends plz
help me to complete this program
import java.util.*;
public class StringDemo {
static...[] to HashMap so that i can seperate key and value using Map.Entry.Please
help me!