Questions tagged [java]
Questions about instruction specific to the programming language Java. Use this tag only when the language used would affect the question significantly (if your question uses Java as an example, but does not focus on the language itself, you need not use the tag).
62 questions
4
votes
3
answers
198
views
Using IDEs with built-in AI code assistance for introductory courses
In my University, we heavily lean on Java as our primary language of choice. During the very first programming course (Basics of Programming in Java, 60 hours) for quite some time we have been ...
5
votes
3
answers
282
views
Are jUnit or TestNG simple enough for undergraduates to apply in a matter of weeks? What alternative?
I was hoping that in this year's Software Engineering class, our capstone for Computer Science, could implement a disciplined automated test strategy for their Java project. Now, with only seven weeks ...
1
vote
1
answer
76
views
Is there an array-like data type in Java that can cope with generic types better than the built-in array?
TL;DR I'm looking for a replacement for the primitive array data type in Java that works better with generic data types.
Background: I'm teaching A level CS in the UK (age 16-18) and we're using Java ...
2
votes
5
answers
149
views
When teaching Java, should I teach try-catch from the outset?
TL;DR How important is the try ... catch syntax when starting out with learning Java?
Background: I'm teaching A level CS in the UK (age 16-18) and we're using Java ...
7
votes
16
answers
3k
views
Parent class variable pointing to Child class
Given the following:
Dog rover = new Puppy("rover"); // Where Puppy extends Dog
A student asked why would you ever want or need a Dog variable point to ...
0
votes
4
answers
395
views
Best books for solid foundation build up for python and java
Fellow programmers. I am currently learning java and python in my Master's degree (introduction) and I did those languages 2 years ago. And when I revisited for the units I feel like I have basic ...
1
vote
2
answers
126
views
Getting started on contributing to open source and making software
I’m just graduated high school. I learnt java in high school, but the java I learnt was taught on bluej and we weren’t taught to create any software or anything. I want to start contributing to open ...
3
votes
6
answers
328
views
How to learn Java as a beginner?
I want to start learning Java from scratch. But as a beginner, I don't know where to start or what to learn first. I have basic knowledge in C++ but Java is an entirely new area to me. Can anyone give ...
5
votes
3
answers
348
views
Best book and video lecture series to follow for an "object oriented programming" course for advanced undergraduates
I am looking for an elegant textbook to be followed for self-study in an objected oriented programming course at the undergraduate level. Our course is as shown:
I humbly request you to suggest to me ...
0
votes
1
answer
147
views
Cheating detection script [duplicate]
The pandemics has incredibly increased the number of cheating cases. Do you know of any script (bash or other scripting language) for checking a bunch of Java code submissions for similarity? I know I ...
3
votes
3
answers
731
views
What's a good example of a static factory method returning instances of subclasses?
One benefit of having a class provide a static factory method rather than public constructors is the method can return an instance of a subclass.
For example, if the class ...
26
votes
11
answers
4k
views
When mentoring individuals, teach clean coding and simple/effective thinking or let them do it their way?
I have a background of 20+ years professional coding, but my heart is really in teaching. About three years ago, I started tutoring ages grade 6 through adult in coding topics.
introduction to coding ...
2
votes
3
answers
553
views
Is there a Java library for testing command line applications?
JUnit seems to work well for unit tests, but I'm not interested in unit tests, I want to test and entire command line application as a black box.
I have created a text-based adventure game project for ...
1
vote
1
answer
214
views
AP Computer Science A vs. OCP
Out of my own interest, I have been self-learning Java over the past few months.
I decided I should take this to a greater advantage, so I have been considering taking the OCP (Oracle Certified ...
3
votes
4
answers
1k
views
Java: The Complete Reference, which edition to follow
Java is updating on a regular basis and it being so the corresponding text books to study Java also changes. Now I do not know why the edition "Java 2: The Complete Reference" by Herbert ...