Posted by JJ on Thursday, January 20, 2011 at 5:41am.
This is the code what i tried but its not thw thing i want
import javax.swing.*;
public class Letter
{
private String sendername;
private String recipientname;
private String bodyletter;
public static void sender (String nsender)
{
String name= "a";
}
public static void recipient (String nrecipient)
{
String name= "b";
}
public static void letter (String bletter)
{
String letter="Studentletter";
}
public static void addLine (String line)
{
String linea=" ";
}
public String getText()
{
String body= "Dear natasha";
//System.out.println(body);
String line2 =" ";
//System.out.println(line2);
String line3=" Student of java class";
// System.out.println(line3);
String line4="question";
// System.out.println(line4);
String line5="sincerely";
//System.out.println(line5);
String line6=" ";
//System.out.println(line6);
String line7="john";
// System.out.println(line7);
String n =body+ "\n "+ line2 + "\n" + line3 + "\n" + line4 + "\n" + line5 + "\n" + line6 + "\n" + line7;
//return n ;
return getText();
}
public static void letterPrinter()
{
String s1="Dear Teacher !";
String user="I am a student of class java.";
String s= s1 + "\n" + user;
System.out.println(s);
String ns ="Sincerely ,";
String line6=" ";
System.out.println(line6);
String student = "b";
String a =ns +"\n" + student;
System.out.println(a);
}
public static void main(String[] args)
{
letterPrinter();
}
}
Here are some java programming tutorials that I hope will help you and don't forget the Related Questions down below:
http://search.yahoo.com/search?fr=mcafee&p=java+programming+tutorials
Sra
What does happen?
Related Questions
French - Our French class was given an assignment where each student would write...
human resources - at school i was asked to write a job letter. this letter will ...
Grammar - What exsits or orcurrs in space that is 19 spaces long. The sencond ...
history - need these letters unscrambled to make a nine letter word relating to ...
uop - the different strategies and techniques used in writing a good-news letter...
English 8R - Business Letter Assignment Help! - I have this assignment for my ...
philosophy - I am supposed to write a pursuasive letter to a european ...
writing - Describe the different strategies and techniques used in writing a ...
English - I'm a 7 Letter Words, You Read me daily, My 5, 6, 7th Letter ...
programming.Java language - Write a program to plot a face. Provide a class ...
For Further Reading