r/learnjava • • May 24 '15

Any good sources out there to learn java

0 Upvotes

hi am looking to get my feet wet in programming and was particularly interested in building android apps for which i need to learn java so is there any beginner book out there which teaches java while also teaching abt android app development


r/learnjava • • Sep 24 '18

New to java need help correcting mistake

1 Upvotes

I turned in this assignment and I was missing some information. Below is the assignment and below that I will copy and past the source code I turned in. I received a 60 on the assignment. In this week's assignment I will have to build from this assignment and I wanted to know what I was missing in order to know how to correct the problem and build going forward. Write a java program named ShipmentDisplayYourName and post the .java source file and a screen shot of your program's execution results in a Word document in its dropbox. Do not use .zip or .txt or .png etc only .java and/or .docx.

Using a Scanner object read and display using a System.out.println object the following data items/fields for a Shipment:

Shipment ID: String shipId

Shipment weight: int shipWeight

Shipment volume: int shipVolume

Shipment origin station: String shipOrigin example MEM for Memphis

Shipment destination station: String shipDestination example SEA for Seattle

Calculate and display the cost (as a type double) of this shipment which is shipWeight times 10 plus shipVolume times 1.5.

Also display the class name and date and time as a Date object on a separate line.

import java.util.Date;

import java.util.Scanner;

public class ShipDisplay {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

String shipId;

String shipOriginMEM;

String shipDestinationSEA;

System.out.println("Shipment ID:");

int shipWeight = 1, shipVolume = 1;

double shipCost;

System.out.println("shipWeight10+shipVolume1.5");

System.out.println("MIS 2845");

Date thisDate = new Date();

SimpleDateFormat dateForm = new SimpleDateFormat("MM/dd/Y hh:mm a");

System.out.println(dateForm.format(thisDate));

}

}


r/learnjava • • Nov 28 '19

Wondering if anyone could help with this

1 Upvotes

Write a program which uses a 1D array to store 10 temperature readings.

The user should indicate at the start of the program, what scale is being used when the data is being entered, either Celcius or Fahrenheit.

When the 10 temperatures are entered the program should proceed to convert C->F or F->C temperatures, whichever is the case in question and display the results using suitable output messages.

The program should uses 4 functions, main(), controller(), ctof() and ftoc(). The purpose of each of these functions is as follows:

Function Name: controller()

Object: Ask user for scale in which the data will be

entered, gets the 10 temperatures into the 1D

array. Calls either the ctof() or ftoc() function

passing a temperature to be converted. Prints

out the result sent back from the function in a

suitable format.

Function Name: ctof()

Object: Takes in a Celcius temperature and returns the

equivelant Fahrenheit temperature.

Function Name: ftoc()

Object: Takes in a Fahrenheit temperature and returns

the equivelant Celcius temperature.

Fahrenheit -> Celcius / 5 * 9 + 32

Celcius -> (Fahrenheit - 32 )/ 9 * 5


r/learnjava • • Feb 04 '22

Gives me error for this JAVA code.

1 Upvotes

My code:

int [] arr = {2,3,4,5,6,7,8,12,11};

for(int i = 0;i<arr.length;i++);

{

if (arr[i] % 2== 0)

System.out.println(arr[i]);

}

I need to print even numbers from intenger array.


r/learnjava • • Nov 06 '23

Helsinki stopped java course?

1 Upvotes

I am curious as I have been researching and can not find an answer, but why did Helsinki stop updating their Java course? does anyone know?


r/learnjava • • Nov 12 '21

I'm Learning to code games in Java but have only the experience to do a simple "hello world". Can anyone be generous enough to help me?

0 Upvotes

Hi, Im Skavok4d0, a new java enthusiast. i need help kick starting my Java game developing career. Can anyone be willing to help. Maybe some advice in getting started.


r/learnjava • • Sep 25 '23

Wtf is this BS. Mooc Java Part 1 Advanced Astrology Spoiler

0 Upvotes
public class AdvancedAstrology {

    public static void printStars(int number) {
        // part 1 of the exercise
        for(int i = 0; i < number; i++){
            System.out.print("*");
        }
    }

    public static void printSpaces(int number) {
        // part 1 of the exercise
        for(int i = 0; i < number; i++){
            System.out.print(" ");
        }
    }

    public static void printTriangle(int size) {
        // part 2 of the exercise
        for(int i = 1; i <= size; i++){
            printSpaces(size - i);
            printStars(i);
            System.out.println("");
        }
    }

    public static void christmasTree(int height) {
        // part 3 of the exercise
        int starNumber = 1;
        for(int i = 1; i <= height; i++){
            printSpaces(height - i);
            printStars(starNumber);
            printSpaces(height - i);
            System.out.println("");

            starNumber += 2;
        }

        for(int i = 0; i < 2; i ++){
            printSpaces(height - 2);
            printStars(3);
            System.out.println("");
        }
    }

    public static void main(String[] args) {
        // The tests are not checking the main, so you can modify it freely.

        printTriangle(4);
        System.out.println("---");
        christmasTree(4);
        System.out.println("---");
        christmasTree(10);
    }
}

This is my code for this exercise, it works just as it should, christmas tree and all, but since it's not written exactly like the page expects, the tests do not pass and therefore i don't get the points. Seriously, what is this fucking bullshit?


r/learnjava • • Jan 16 '20

IM STUCK CAN SOMEONE HEP ME?

0 Upvotes

Iv been trying to develop a black jack game,in hope that i will learn along side of developing it,I just want it to be a console game thats it . I have cvs class where that handles the file that i send (Deck file) as well as my main method so i wont be posting thoes two . My problems is after i send my parametars to constructor of a deck class i have this method called drawOneCard where i send data fileds to a constructor of a dealer class where i store it into Hand arraylist but the parametars arent going trought,where am i mistakin here?
CLASS DECK

private int cardValue;

private String cardRank;

private String suitRank;

static ArrayList<Deck> deck = new ArrayList<Deck>();

Deck(){
}

public Deck(int cardValue,String cardRank,String suitRank) {

this.cardValue = cardValue;

this.cardRank = cardRank;

this.suitRank = suitRank;

deck.add(this);

}

public static void drawOneCard() {

String drawnCard;

int drawnCardValue;

drawnCard = deck.get(51).getCardSuit() + deck.get(51).getCardRank();

drawnCardValue = deck.get(51).getCardValue();

new Dealer (drawnCard,drawnCardValue);

Collections.swap(deck, 51, 0);

Collections.swap(deck, 51, 50);

}

public static void shuffle() {
Collections.shuffle(Deck.deck);
}

public int getCardValue() {

return cardValue;

}

public String getCardRank() {

return cardRank;

}

public String getCardSuit() {

return suitRank;

}

}

CLASS DEALER

String cards;

int values;

static ArrayList<Dealer> Hand = new ArrayList<Dealer>();

Dealer(){

}

Dealer(String cards,int values){

this.cards = cards;

this.values = values;

Hand.add(this);

}

public static void deal() {
Deck.shuffle();

for(Dealer arrayItem : Hand)
{

System.out.println(arrayItem);

}

}

int getCardValue() {
return values;
}
String getCard() {
return cards;
}

}


r/learnjava • • May 15 '14

Very new to writing Android App, need tons of help

0 Upvotes

Hi, I am very new to java and I want to start out by creating a very simple app for my phone, such as an app that you take me to a web page. Where do I start? How should i do it? I do have eclipse on my computer but I have no clue how it works. I have use visual studio before for programming C.

Thanks


r/learnjava • • Nov 26 '18

I cannot run code in IntelliJ because "class is not being used"...

0 Upvotes

How can I solve this? I followed instructions and I find this problem...


r/learnjava • • Dec 19 '15

How to Read/Write Excel (.XLS and .XLSX) File in Java?

Thumbnail
java67.blogspot.com
1 Upvotes

r/learnjava • • May 15 '24

Java backend developer study group

1 Upvotes

Hi everyone,

I'm a product manager at Hyperskill, and I wanted to share something we're trying out. We've got this Java Backend Developer track from JetBrains Academy that has helped many students land jobs, and now we're forming a study group with a dedicated moderator to see if it helps even more.
We're aiming to complete the track in 4 months with a supportive group, and I can offer a 10% discount for the next 10 participant (write me in DM).

I'm really excited about this, but I'm not sure if it's okay to post this here. If it breaks any rules, I hope the moderators will let me know.

If you're interested in joining or just want to know more, check out the details here https://go.hyperskill.org/java-landing-cohort


r/learnjava • • Aug 14 '15

Which IDE to use.

1 Upvotes

I'm a beginner. I know the programming basics, may be advanced basics I'd say. I used eclipse up until now, which is recent, as I switched from c++ to java and I never coded much. So now that I decided to program more. I'm caught between which IDE to use. Eclipse, net beans, and others. Could you suggest me. Also would be great if you could tell me the same for c++(I know wrong sub) sorry. Thanks.

Edit : I have decided to try each and see for myself. But any opinion on why one is used or why do you consider one is welcome.


r/learnjava • • May 28 '24

How in Java it is feasible?

1 Upvotes

Hi

How in Java below is feasible?

Object array = new Long[10]; // Valid

But not,

Long array = new Long[10]; // Not valid

What is going on here, Technically?

My doubt is, how Object Type holds array value, what’s going on here?

Thanks in advance

Edit : It is not specific to Long Type but we can also provide other Types, have given Long Type for example purpose


r/learnjava • • Dec 21 '21

So i just learned about java

0 Upvotes

So i just learned about java and want to use it immediately. And i know where i wany to use it BUT the code they use is c/c++. Someone also said just learn phyton.(2hich i will) but i want to KNOW java first.

I want to make a mod for a game called "enter the gungeon" the developers for that game even came out and gave some resources. And a mod example code.

How do i do the code but with java. Also i am total beginner i havent made a single code on my own and still learning basics


r/learnjava • • Jul 28 '15

ADVICE FOR FIRST-TIME PROGRAMMER : WHERE TO LEARN

1 Upvotes

No prior programming background.

I am a college student wanting to learn Java language - free from Aug 7 to Aug 21. I am based in NYC in that time-frame. I've looked online but all I could find are online classes and no live instruction - friends have said first time learning programming should be in-person. Any reccommendations? Want to learn Java.


r/learnjava • • Jan 08 '26

What to learn next after learning Java?

0 Upvotes

Hi,

I don't know which path to take, weather to learn Spring Boot for microservices or weather to learn selenium for automation or something else which is in demand. Please help a fellow Redditor with some guidance as I am supper confused which path and the one which isn't killed by ai.


r/learnjava • • Feb 11 '26

What is the best way to learn Java from scratch?

1 Upvotes

I am a college freshman taking intro to computer science, what should I do to make a consistent effort and get better in coding?


r/learnjava • • Sep 15 '25

Can anyone suggest some of the best Java courses available online (Udemy,Coursera OR Any other platform)??

0 Upvotes

I want to learn Java from the basics. I am looking for a course that also includes a project. Any recommendations would be super helpful!!


r/learnjava • • Oct 10 '26

Should I learn Java Spring Boot again to become a full-stack developer? Looking for career advice

1 Upvotes

Hey everyone,🙃

I started my career working with Java and Spring Boot for around 3–4 months, during which I learned the basics. Later, due to project requirements, I shifted towards JavaScript and React. I’ve now spent around 2 year working primarily with React.

Recently, I’ve been looking at the job market in India, and it seems like there are quite a few opportunities for Java and Spring Boot developers. At the same time, I’m finding it difficult to find good opportunities as a React developer that offer decent pay.

To make things more challenging, my company is laying off employees, and I’m currently serving a two-month notice period. This has made me think more seriously about my next career move.
I’m considering revisiting Java and Spring Boot and building on my existing knowledge so I can apply for full-stack developer roles involving Java, Spring Boot, and React.

However, I’m confused about whether this is the right decision, especially given my limited time to prepare for interviews and find another job.
I’d really appreciate advice on a few things:
Is learning Java and Spring Boot again a good career move in the current Indian job market?

Can I realistically prepare for Java + React full-stack roles within my two-month notice period?
Should I focus on strengthening my React skills or invest more time in learning Java and Spring Boot?
What would be the best learning roadmap to become job-ready as quickly as possible?
For someone in my situation, what would you prioritize to improve the chances of getting a good job with decent pay?

I’d especially appreciate advice from developers who have switched tech stacks or navigated a similar situation.

Thanks in advance for your suggestions!


r/learnjava • • Sep 05 '26

Is java a first good programing language to learn? i have never did programing so i dont know. Any suggestions?

1 Upvotes

welp i need tips and advice


r/learnjava • • Nov 27 '25

Backed Engineer

4 Upvotes

I started my journey of backed development 2 years ago, My first backed language was JavaScript and I build my first CRUD API using Express.js. I first watch other people build blog app and I copy paste and did myself debugging when thing goes wrong. Than I build myself blog app and it's been 2 month I build my second application "Chat web App" using Redis, GraphQL, postgreSQL and express.js.

I was weak on OOPs and become comfortable ( I think ) to working in JavaScript, Express. I learn industry wants Java Developer. I switched and I am learning Spring boot. To learn DSA , it's also another one my choice to learn JAVA and I always passionate by Java. I think I don't have any questions on my currentState but I wanted to write, To introduce myself as a fellow Backed Engineer.

Fin.


r/learnjava • • Jul 20 '26

Can I become employable as a Java Full Stack developer in 12–15 months by studying only 2 hours/day? Looking for a realistic roadmap.

0 Upvotes

Hi everyone,

I'm from India and I'm planning to learn Java Full Stack (Java + Spring Boot) as a long-term career. Due to my current responsibilities, I can consistently study only 2 hours per day, but I'm prepared to stay disciplined for 12–15 months.

My goal is to become employable in India, while also building skills that would be useful if I later apply to companies in other countries.

However, I'm worried about a few things:

The current software job market seems very competitive, especially for freshers.

Many people say it may get even worse over the next few years.

AI is improving rapidly, and I'm afraid that by the time I'm job-ready, junior developer roles may have changed significantly.

I'm also worried about getting laid off in the future and struggling to find another job.

So I'd really appreciate advice from people who are actually working in the industry.

Here are my questions:

Is becoming employable in 12–15 months with 2 hours/day a realistic goal?

If yes, what should I learn, and in what order?

If you were starting from scratch in 2026, what roadmap would you follow?

Which resources (YouTube channels, websites, books, documentation, Reddit threads, blogs, forums, etc.) would you recommend?

What projects should I build to stand out instead of creating the same CRUD applications everyone else has?

What skills are companies actually looking for in junior Java Full Stack developers today?

Which technologies are "must-have" alongside Java and Spring Boot? (React, Docker, AWS, Kubernetes, Kafka, Microservices, etc.)

How much DSA/LeetCode is actually necessary?

What are the biggest mistakes beginners make?

If you had to design a complete self-study course for someone with only 2 hours/day, what would it look like?

What would make someone more resilient to AI rather than more replaceable by it?

If you were hiring a fresher in 2027–2028, what would make one candidate stand out over hundreds of others?

I'm not looking for shortcuts or "learn X in 30 days" advice. I'm willing to put in consistent effort for over a year. I just want to spend those 700–900 hours on the right things instead of wasting time on outdated tutorials or technologies.

I'd really appreciate honest opinions from developers, hiring managers, senior engineers, or anyone who's recently landed a Java Full Stack job.

Thanks!


r/learnjava • • Oct 01 '24

Are Java programs slow, or is there an issue with my program?

4 Upvotes

Hi, here is my problem, I use to use a vba program to compare two excel tables with more than 4000 rows each, and 8 cols, and the result is a third table with combined data from the two first tables, the problem with vba is in such case the program takes the whole day running, and you can't use excel during the process.

So being a new java learner I thought doing the same program with java would be much faster, but unfortunately the program is still slow( not as in vba) but take an important duration, and another problem with that is that the disk space is getting smaller during the running of the program.

So, knowing that the program is just a simple java program which opens an excel file, and use loops and conditions to compare data, and write a new table, I just want to know if 1- this is because of my huge tables(over 4000 rows 8 cols) where each row is compared to a number of rows in the second table according to a specific date and other data. 2- I am missing something about how to use fileoutputstream to write data in the third table.

3- Lack of disk space or memory(1gigs disk space/ 8gigs memory)

Or just that java programs are slow, which I don't think so.

Thank you in advance for your time.