Question about Computers & Internet

1 Answer

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

Can you help me with this problem bro?..please?..a java program that prints # then says whether the # is odd or even..thankz!..

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Corporal:

    An expert that hasĀ over 10 points.

    Mayor:

    An expert whose answer gotĀ voted for 2 times.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 15 Answers

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

Posted on Apr 19, 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:

1 Answer

Tm u220 java


Are you printing from inside a java program (output) or from a java program editor.
Use the command to Open an output file, have all your output sent to the output file, close the output file properly before you exit the java program. After you finish send the output file to the matrix printer as you would with ASCII file. If the printer is installed properly, your OS should know where to send the output.

Dec 23, 2013 | Epson TM-U220 Matrix Printer

1 Answer

My brother printer DCP 395CN does not give option of printing odd or even pages in fast or fast normal mode. When i switch to normal printing mode it provides option. I want to print pages on both sides...


Some printers automatically print automatic duplex printing, other printers allow you to manually reinsert pages to print the second side .and some printers do not support duplex printing at all.

To find out whether your printer supports duplex printing, you can check the printer manual, contact the printer manufacturer, or check the printer's properties by clicking Properties in the Print dialog box

Note that If you have more than one printer installed, it's possible that one printer supports duplex printing and another printer does not.

Mar 28, 2011 | Brother Dcp395cn InkJet Printer

1 Answer

ES 5300 only prints left side


From the program you print the document (MS Word, Acrobat Reader or another one?) go to File and select the Print... or Print Properties option (depending on what program you print from). Then, go through the option and look for an option that says something like "Print Odd Pages" or Print Even Pages". As you're describing the situation, it seems that either the program you use, or the printer control panel, is set to print only odd or only even pages. So you'll need to find this setting and switch to Print All Pages or something along those lines. The labels and wording of these settings depend on the program you want to print from, so expect that you'll need some looking around to do before you find this setting.

Jan 17, 2011 | Kodak EASYSHARE 5300 All-In-One InkJet...

1 Answer

I want to format java code and later want to check whether it got formatted, using checkstyle. How can i do that


write a program that get an input size from the user and print the multiplication table with the specified size :
size of the multiplication table 5;
multiplication table of size 5;

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

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

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

My Java stopped working when I took Norton's out and I can not get it working again. I have taken it out and put it back in several times and still it want work, it says it is working, but when I go to a...


First please go here and check whether its functioning well. Sun Java Site If it doesn't work follow the steps.
Get latest updated one from here http://www.java.com/en/download/manual.jsp
This problem happens when Norton Internet Security or Norton Personal Firewall has been configured to block scripts, ActiveX controls, Java applets, referral information, or advertisements.
ActiveX controls and Java applets can be blocked by customizing your security settings from the main interface. To find out whether this is the problem, read the section "Customize security settings."
All of these security features (scripts, ActiveX controls, Java applets, referral information, and advertisements) can be blocked by specific Web rules. These rules are located in the Advanced Options of the program. For scripts, ActiveX controls, Java applets, and referral information, see the "Web rules" section of this document.
You have to configure the settings of your antivirus suite or/and firewall. Since I do not know which version of Norton you use (if you provided the version I could guide you further. Even if you have uninstalled the settings would be there. How to enable Java if disabled... http://www.java.com/en/download/help/enable_browser.xml
This answer is aimed at Java Runtime and Plugins in a Windows environment. Not aimed at any other operating system including Java Desk.

May 29, 2010 | Sun Java Desktop System

2 Answers

Java won't load on my computer


id suggest that you uninstall java and delete the folder from the hard drive after you uninstall it from the computer, and then clean the registry of any instances of old keys associated to java,then redownload and reinstall java fresh,be sure its the right version for your Vista ( home,Bussniess) Hope this Helps Steve

Oct 01, 2009 | Computers & Internet

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)

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

Related Topics:

63 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

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

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

Answer questions

Manuals & User Guides

Loading...