Click here to Skip to main content
15,305,754 members
Home / Discussions / Java
   

Java

 
AnswerRe: JAVA PROGRAMMING Pin
Richard MacCutchan9-Feb-21 2:49
mveRichard MacCutchan9-Feb-21 2:49 
QuestionBarrons Ap Computer Science A / question on compound boolean Pin
Ap_noob12-Jan-21 11:45
MemberAp_noob12-Jan-21 11:45 
AnswerRe: Barrons Ap Computer Science A / question on compound boolean Pin
Richard MacCutchan12-Jan-21 21:40
mveRichard MacCutchan12-Jan-21 21:40 
QuestionConvert string array to integer without using loop? Thanks Azbilegt Chuluunbat Pin
Azbilegt Chuluunbat30-Dec-20 6:48
MemberAzbilegt Chuluunbat30-Dec-20 6:48 
AnswerRe: Convert string array to integer without using loop? Thanks Azbilegt Chuluunbat Pin
Victor Nijegorodov30-Dec-20 7:20
MemberVictor Nijegorodov30-Dec-20 7:20 
AnswerRe: Convert string array to integer without using loop? Thanks Azbilegt Chuluunbat Pin
Richard MacCutchan30-Dec-20 21:26
mveRichard MacCutchan30-Dec-20 21:26 
AnswerRe: Convert string array to integer without using loop? Thanks Azbilegt Chuluunbat Pin
Randor 31-Dec-20 0:30
professional Randor 31-Dec-20 0:30 
QuestionDon't understand the error Pin
rorilila25-Dec-20 23:13
Memberrorilila25-Dec-20 23:13 
Can anyone help me figure this out? I wrote the following code for my programming class. Confused | :confused:

package weekthreeassignments;

Java
/**
*
* @author fred
*/

public class Odds {
public static void main(String[] args) {
int product = 1;
for (int i = 1; i <= 15; i++)
if (i % 2 == 1) {
product *= i;
}
System.out.println("Product of the odd integers from 1 to 15 is: " + product);
}
}


When I run the code I get the following error and how to fix it, but if you read the "Please define" part, I did define it that way. Why am I still erroring?


Error: Main method not found in class weekthreeassignments.Odds, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
C:\Users\fred\AppData\Local\NetBeans\Cache\10.0\ex ecutor-snippets\run.xml:111: The following error occurred while executing this line:
C:\Users\fred\AppData\Local\NetBeans\Cache\10.0\ex ecutor-snippets\run.xml:68: Java returned: 1
BUILD FAILED (total time: 0 seconds)
AnswerRe: Don't understand the error Pin
Sandeep Mewara25-Dec-20 23:26
mveSandeep Mewara25-Dec-20 23:26 
AnswerRe: Don't understand the error Pin
Richard MacCutchan25-Dec-20 23:31
mveRichard MacCutchan25-Dec-20 23:31 
QuestionIs truncating a table faster than dropping and re-creating it in SQL? Thanks Azbilegt Chuluunbat Pin
Azbilegt Chuluunbat20-Dec-20 13:54
MemberAzbilegt Chuluunbat20-Dec-20 13:54 
AnswerRe: Is truncating a table faster than dropping and re-creating it in SQL? Thanks Azbilegt Chuluunbat Pin
Richard MacCutchan20-Dec-20 22:08
mveRichard MacCutchan20-Dec-20 22:08 
AnswerRe: Is truncating a table faster than dropping and re-creating it in SQL? Thanks Azbilegt Chuluunbat Pin
Dave Kreskowiak21-Dec-20 3:49
mveDave Kreskowiak21-Dec-20 3:49 
AnswerRe: Is truncating a table faster than dropping and re-creating it in SQL? Thanks Azbilegt Chuluunbat Pin
BabyYoda21-Dec-20 3:57
MemberBabyYoda21-Dec-20 3:57 
AnswerRe: Is truncating a table faster than dropping and re-creating it in SQL? Thanks Azbilegt Chuluunbat Pin
Gerry Schmitz21-Dec-20 7:59
mveGerry Schmitz21-Dec-20 7:59 
QuestionIs there any Java library to invoke SQL queries on SQL Server? Thanks Azbilegt Chuluunbat Pin
Azbilegt Chuluunbat20-Dec-20 5:28
MemberAzbilegt Chuluunbat20-Dec-20 5:28 
AnswerRe: Is there any Java library to invoke SQL queries on SQL Server? Thanks Azbilegt Chuluunbat Pin
Richard MacCutchan20-Dec-20 6:09
mveRichard MacCutchan20-Dec-20 6:09 
QuestionProgramación orientada a objetos en Java Pin
Member 1501835311-Dec-20 2:07
MemberMember 1501835311-Dec-20 2:07 
AnswerRe: Programación orientada a objetos en Java Pin
OriginalGriff11-Dec-20 2:08
mveOriginalGriff11-Dec-20 2:08 
QuestionMy First Java Pin
Nano Tape5-Dec-20 14:58
MemberNano Tape5-Dec-20 14:58 
AnswerRe: My First Java Pin
Richard MacCutchan5-Dec-20 21:31
mveRichard MacCutchan5-Dec-20 21:31 
QuestionDefault Sudoko grid conversion from 9*9 to all grid size Pin
payugaka3-Dec-20 17:22
Memberpayugaka3-Dec-20 17:22 
AnswerRe: Default Sudoko grid conversion from 9*9 to all grid size Pin
Richard MacCutchan3-Dec-20 22:55
mveRichard MacCutchan3-Dec-20 22:55 
QuestionI'm a beginner and I'm only a month into Java. I struggle with a massive subject, is this a usual thing for begginers? It took me a long time to only understand this code. Pin
Denys Lysenko22-Nov-20 4:09
MemberDenys Lysenko22-Nov-20 4:09 
AnswerRe: I'm a beginner and I'm only a month into Java. I struggle with a massive subject, is this a usual thing for begginers? It took me a long time to only understand this code. Pin
Richard MacCutchan22-Nov-20 4:32
mveRichard MacCutchan22-Nov-20 4:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.