answersLogoWhite

0


Best Answer

public class apples {

public static void main(String argc[]) {

for(int i = 0; i <= 50; i++){

if(i % 2 != 0){

System.out.println(i);

}

}

}

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

The for loop is very useful for this. Just start with 51, and add 2 at a time.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Java source code of odd numbers between 1 and 50?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Differencitate between source code and bytcode in java?

The source code is just the set of statements written in (any included) java language by a programer (in this case our source code is a text file with .java extension). And in other hand a bytecode is the resulting code of compile a .java file, It is not machine code, but it can be interpreted and executed by the jvm.


What kind of file contain java source code?

'.java' files contain java source code. One can access these files on windows by using 'notepad'.


Where does source code come from in java?

Source code comes from the programmer...


What does the Java compiler translate Java source code to?

The Java compiler translates Java source code to Java byte code.


Java source code for median filter algorithm?

research is going on to develop a source code for median filtering using java


Difference between a java complier and the Java JIT?

A java compiler takes Java source code and turns it into Java bytecode, which can then be run by the java virtual machine.Using JIT means that the java code will be compiled and executed at the time that you run the program, which will slow down the program because it has to compile the code at the same time that it runs.


What does a compiler perform?

A compiler converts high-level source code into native machine. In the case of Java, source code is compiled to Java byte code suitable for interpretation by the Java virtual machine which produces the machine code.


Where does bytecode come from java?

It is created by the Java compiler, based on the source code (the .java file).


What is a Javacode?

If someone talks about "Java code," then they're are most likely referring to the source code of a Java program.


How do you extract the java source code of a java based open source software?

If the software is open source then generally they will provide the code in a separate link. I don't think it is possible to reverse-engineer the code of a program.


Website of free java project to be download with source code?

which Website for free java project to be download with source code Free Download Project in asp.net,Java ,C#.Net ,Php on thisWebsite www.enggroom.com


What do you call a Program that runs Java byte code instruction?

Get the JDK &amp; Bluej from net and the rest will be done by them. Java byte codes are stored as *.class ; where "*" represents the class name, in your hard disk. You can download BlueJ as well as JDK from the related link.