Question about Computers & Internet

1 Answer

Java code i have a zip file of my code but there is a problem that i cannot find in my reading from my class so i am turning to the experts here... if anyone can tell me what my changes would need to be (i think i see the problem but cant identify the solution) and then help me with the next step... that would be terrific!!

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 2 Answers

First you should extract your zip file.for that right click on that file and you can see the option extract, just click it.it will take some time to extract the file.after that open the file by double click it.

Posted on Feb 04, 2008

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:

2 Answers

What is strings in java?


Handling character strings in Java is supported through two final
classes: Java String and StringBuffer. The String class implements immutable character strings, which are read-only once the string has been created and initialized, whereas the StringBuffer class implements dynamic character strings. All string literals in Java programs, are implemented as instances of String class. Strings in Java are 16-bit Unicode.

Nov 21, 2012 | Sun Java Programming Language (cdj-275)

1 Answer

Java Vitual Machine Launcher prompts this message "Could not find the main class. Program will exit" How can I solve this problem? I need urgent assistance.


You need to compile the .java file you have, and run the .class file that is produced.
Open up command prompt, go to your working directory. If your file was called Hello.java: In command prompt type "javac Hello.java". Now, in the working directory, you will see a new file, Hello.class. Run that file by "java Hello.class". Hope this helps!
Thanks for using FixYa

Aug 20, 2011 | Sun Java Programming Language (cdj-275)

1 Answer

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


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

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

1 Answer

How to get no. Of pixels from given image through java


try this code

import java.awt.image.PixelGrabber;
import java.awt.Toolkit;
import java.awt.Image;
class getpixel2
{
public static void main(String args[]) throws Exception
{

Image image = Toolkit.getDefaultToolkit().getImage("D:\\one.jpg");

if(image==null)
System.out.println("NO FIle");
PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, false);

if (grabber.grabPixels())
{
int width = grabber.getWidth();
int height = grabber.getHeight();

if (isGreyscaleImage(grabber))
{
byte[] data = (byte[]) grabber.getPixels();

}
else
{
int[] data = (int[]) grabber.getPixels();
for(int i=0;i<data.length;i++)
{
int r = (data[i] >> 16) & 0xff;
int g = (data[i] >> 8) & 0xff;
int b = (data[i] >> 0) & 0xff;
System.out.println("(R,G,B)=("r","g","b")");
}
}

}
}
public static final boolean isGreyscaleImage(PixelGrabber pg)
{
return pg.getPixels() instanceof byte[];
}
} import java.awt.image.PixelGrabber;
import java.awt.Toolkit;
import java.awt.Image;
class getpixel2
{
public static void main(String args[]) throws Exception
{

Image image = Toolkit.getDefaultToolkit().getImage("D:\\one.jpg");

if(image==null)
System.out.println("NO FIle");
PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, false);

if (grabber.grabPixels())
{
int width = grabber.getWidth();
int height = grabber.getHeight();

if (isGreyscaleImage(grabber))
{
byte[] data = (byte[]) grabber.getPixels();

}
else
{
int[] data = (int[]) grabber.getPixels();
for(int i=0;i<data.length;i++)
{
int r = (data[i] >> 16) & 0xff;
int g = (data[i] >> 8) & 0xff;
int b = (data[i] >> 0) & 0xff;
System.out.println("(R,G,B)=("r","g","b")");
}
}

}
}
public static final boolean isGreyscaleImage(PixelGrabber pg)
{
return pg.getPixels() instanceof byte[];
}
}

May 15, 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)

4 Answers

Can anyone tell how run java program in cmd prompt???


Hi,

You need to type:

If it's a program.class

java program

or of it's a program.jar

java -jar program.jar

regards

Apr 03, 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)

1 Answer

IM FINDING A CODE OF MINESWEEPER IN JAVA, FOR MY PROJECT, WOULD YOU HELP ME?


Hi  Visit the link  http://timvandenbulcke.objectis.net/minesweeper-in-java/minesweeper.zip/view
and click on the  Click here to get the file link , you will get the source code. Please rate me if your problem is solved
Thanks!

Mar 18, 2009 | Computers & Internet

1 Answer

Unable to View Java Applet


"load: class JFI.class not found."
Based on the console output, it means that it cannot find the java applet class. In other words, the applet is missing on the server side. There is nothing that you can do about it, unless you know the person who created the applet. Good luck :)

Dec 23, 2008 | ArcMedia JavaScript Source Code 3000 Pro...

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

Related Topics:

58 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

98796 Answers

David Payne
David Payne

Level 3 Expert

14071 Answers

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

Answer questions

Manuals & User Guides

Loading...