Question about Sun Java Programming Language (cdj-275)

1 Answer

Please write a java program to print my full name dhanalakshmi in a single line.

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that gotĀ 5 achievements.

    Governor:

    An expert whose answer gotĀ voted for 20 times.

    Hot-Shot:

    An expert who has answered 20 questions.

  • Expert
  • 149 Answers

Place the below code in a text file dhana.txt and compile it.

class dhana {
public static void main(String[] args) {
System.out.println("dhanalakshmi"); // Display the string.
}
}

regards
harit

Posted on Jul 07, 2010

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Please write a java program to print your full name in a single line.


class username {
public static void main(String[] args) {
System.out.println("your name goes here"); // Display the string.
}
}

Jul 07, 2010 | Sun Java Programming Language (cdj-275)

1 Answer

How to make software


Hi, I am a software engineer by profession. Well a software is a collection of many programs that combined to give a full functionality. Aprogram is a small part of a software. And a software is not only the program, it contains a full set of processes and document, testing. You can build a software yourself but it will take some time and effort.
Regads, polysandy

Apr 12, 2010 | Computers & Internet

4 Answers

Java is not working


Hello there :
first you are going to want to ensure that your your current version of java is installed correctly and is not corrupted and if it needs to be reinstalled
download the latest java version and reinstall this . www.java.com
this should be able to take care of the problem that you are having ok?
best regards michael

Aug 23, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

1 Answer

I want to read text file which is located in c drive using java code can anybody help me out


import java.io.*;
import java.util.Scanner;

public final class ReadWithScanner { public static void main(String... aArgs) throws FileNotFoundException {
ReadWithScanner parser = new ReadWithScanner("C:\\Temp\\test.txt");
parser.processLineByLine();
log("Done.");
}

/**
* @param aFileName full name of an existing, readable file.
*/

public ReadWithScanner(String aFileName){
fFile = new File(aFileName);
}

/** Template method that calls {@link #processLine(String)}. */
public final void processLineByLine() throws FileNotFoundException {
Scanner scanner = new Scanner(fFile);
try {
//first use a Scanner to get each line
while ( scanner.hasNextLine() ){
processLine( scanner.nextLine() );
}
}
finally {
//ensure the underlying stream is always closed
scanner.close();
}
}

/**
* Overridable method for processing lines in different ways.
*
* <P>This simple default implementation expects simple name-value pairs, separated by an
* '=' sign. Examples of valid input :
* <tt>height = 167cm</tt>
* <tt>mass = 65kg</tt>
* <tt>disposition = "grumpy"</tt>
* <tt>this is the name = this is the value</tt>
*/

protected void processLine(String aLine){
//use a second Scanner to parse the content of each line
Scanner scanner = new Scanner(aLine);
scanner.useDelimiter("=");
if ( scanner.hasNext() ){
String name = scanner.next();
String value = scanner.next();
log("Name is : " + quote(name.trim()) + ", and Value is : " + quote(value.trim()) );
}
else {
log("Empty or invalid line. Unable to process.");
}
//(no need for finally here, since String is source)
scanner.close();
}

// PRIVATE //
private final File fFile;

private static void log(Object aObject){
System.out.println(String.valueOf(aObject));
}

private String quote(String aText){
String QUOTE = "'";
return QUOTE + aText + QUOTE;
}
}

Jun 22, 2009 | Sun Java Programming Language (cdj-275)

2 Answers

Source code in java that display bio data


program that display first name and second name

Jun 18, 2009 | Sun Java Programming Language (cdj-275)

2 Answers

Rename a folder in c drive using java code


import java.io.*;

public class RenameFileOrDir{

public static void main(String[] args) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Please enter the file or directory
name which has to be Renamed : ");

String old_name = in.readLine();
File oldfile = new File(old_name);


if(!oldfile.exists())
{

System.out.println("File or directory does not exist.");

System.exit(0);

}

System.out.print("please enter the new file or directory name : ");

String new_name = in.readLine();

File newfile = new File(new_name);

System.out.println("Old File or directory name : "+ oldfile);
System.out.println("New File or directory name : "+ newfile);
boolean Rename = oldfile.renameTo(newfile);

if(!Rename)
{

System.out.println("File or directory does not rename successfully.");

System.exit(0);

}

else {

System.out.println("File or directory rename is successfully.");

}

}

}

Mar 30, 2009 | Sun Java Programming Language (cdj-275)

3 Answers

Error to compile java program


The main cause of this error is you havent set the environment variables correctly, you can do it as follows

Right click on "My Computers" select properties the click "Environment variables" then under "User variables for pcname"

select new and add the following paths

1)var name:path
var value:C:\Java\jdk1.5\bin

2)var name:classpath
var value:C:\YourJavaCodeDirName

click ok and its done

Feb 28, 2009 | Sun Java Programming Language (cdj-275)

1 Answer

Java and zylom games


This sounds like it could be a case where a simple error in the game is allowed to have enormous consequences. Rather than disconnecting your Internet connection, it may suffice to terminate the java process as follows:
  • Right-click the task bar. Click Task Manager.
  • In the Processes tab of the Task Manager, find java.exe (it might help to click on "Image Name" to have it sort alphabetically)
  • Select the line with the image name of java.exe and click the "End Process" button in the lower right corner of the window.

Have you tried running these games in a different browser? I recommend Mozilla Firefox or Google Chrome. Both are more robust than AOL Explorer, and Google Chrome in particular is designed so that an error in one tab won't cause any problems beyond that.

Please let me know if this helped. If it didn't, feel free to provide more details.

Sep 30, 2008 | Sun Java Programming Language (cdj-275)

1 Answer

A java program that prints # then says whether the # is odd or even


int number = 10 //Insert the number here
if ((number % 2) == 0)  {  System.out.println(number+" is a even number);  } else {  System.out.println(number+" is a odd number); 
{
Let me know if you need a complete java class for this

Apr 15, 2008 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

139 people viewed this question

Ask a Question

Usually answered in minutes!

Top Sun Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18392 Answers

Cosma Papouis
Cosma Papouis

Level 3 Expert

409 Answers

Robin Hill
Robin Hill

Level 3 Expert

1263 Answers

Are you a Sun Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...