Re: very new to java



porky008 wrote:
i am very new as you can see. what am i doing wrong here. any help
would nice

The first suggestion I will make is that when you have a problem with
a nice little example of code, tell us exactly what the problem
is (for extra points, add what you expected to see).

At the moment, this code produces some compile time errors,
starting with..

D:\Welcome.java:6: illegal start of expression
System.out.printf( %s \n%s \n,

...to fix that error, you need to obey the method signature
for the printf method, e.g. printf(String, Object), so to fix it..

public class Welcome
{
// main method begins execution of Java application
public static void main( String args[] )
{
System.out.printf( %s \n%s \n,

// "quote" the string..
System.out.printf( "%s \n%s \n",

"Hi, my name is xxx.", "I was born in xxx.");

} // end method main

} // end class Welcome

HTH

Andrew T.

.



Relevant Pages

  • Re: messeges doesnt appear when downloaded by outlook-express
    ... It helped - your first suggestion. ... as you recommended i'll try to see if my computer is infected with hijackware. ... If regsvr32 inetcomm.dll was the fix, CWShredder should handle any problems if it happens again. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Tools Menu disappeared from Word 2008
    ... That should have been my first suggestion ... We have no idea what causes this, so we can't tell what to fix. ... It took less time to copy user files, bookmarks, and email to a new ... John McGhie, Microsoft MVP, Word and Word:Mac ...
    (microsoft.public.mac.office.word)
  • Re: 94 Miata popping out of fifth gear
    ... That's what my first suggestion was, but with loss of her job due to the ... factory moving overseas, my friend's not in the best of financial health, ...
    (rec.autos.makers.mazda.miata)
  • Re: Option Strict
    ... Compile time errors are much easier and less expensive to fix, ... > I've been advised to use option strict. ... > when comparing/setting two different data types right? ...
    (microsoft.public.dotnet.framework.aspnet)