• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Course : Java SE: Programming Complete free course offer on Oracle University

 
Ranch Foreman
Posts: 323
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had never seriously considered the official Oracle training courses for Java Certification as too expensive, they only seemed a real option for those who had employers willing to pay for them.

Since the 25th Anniversary celebration includes access to the course for free, maybe only thru 25 April, I couldn't tell, I decided to sample it to see what I've been missing due to budget restrictions, using only Enthuware, Sybex and free materials to learn certification stuff.

I've learned a couple of small details so far (remember to avoid $ in identifiers and don't start anything with _) so far...

On "Introduction to Java Part 3", about ~13:38 I noticed that in their first introduction to access modifiers, the example seems to be grossly wrong.
they have a base class in package a, a subclass in package b, and try to show what accesses in the subclass would compile or not compile.
Trouble is, the base class appears to have sub-class type references from package a, not imported.
The base class itself wouldn't even compile.

I am interested in seeing feedback from users who have decided to sample the free course, and would probably suggest people who are not planning to take a certification exam but often answer questions in this forum to check it out just because other people who will be asking questions here are likely to see it.

For right now, I am just confirming "The base class in the slide from Introduction to Java Part 3, ~13:38 wouldn't even compile in the first place, right?"

I am pretty sure I just had bad luck and there are very few errors thru-out the course, which includes material I never got up to studying yet for the 819, but I couldn't resist the temptation to watch and worth thru exercises from the beginning.
 
Jesse Silverman
Ranch Foreman
Posts: 323
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the only things I learned from the first section of the course, which I think the Enthuware 815 material had pointed out, was that you can no longer start variables with _.
On the quiz for section one, they had 'which variable name is illegal?' and there was a choice that began with a numeric digit, and another that began with an underscore.

I guessed the question was out of date, so since it would only let me mark one, I chose the one that began with a numeric digit.

So far, the content is _whelming.

I appreciate that it is being offered for free, and appreciate our friends at Sybex, Enthuware and the host of people helping to educate others for free even more than before.
 
Marshal
Posts: 3457
493
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:One of the only things I learned from the first section of the course, which I think the Enthuware 815 material had pointed out, was that you can no longer start variables with _.


With Java 11 variables can still be prefixed with _ and $ (although it is probably not a good practice):
 
Jesse Silverman
Ranch Foreman
Posts: 323
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ron.
So the only thing I learned so far isn't quite true.

Seriously, nobody should be naming Java variables beginning with _ or containing $ in my opinion*, but apparently it is still treated as legal, maybe they found some popular libraries breaking and held back at the last minute?

Anyway, I think I already found a second error in the materials (third if we count the one you just replied about) but that's for after lunch.

* - people will think you are a Python programmer!
 
Jesse Silverman
Ranch Foreman
Posts: 323
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Something else _whelming.

Sure, we can say that short is the least popular type in all of Java so who cares, but all the little weirdnesses around assignability, upcasting, etc. are in scope for the exam so it matters...

Both Enthuware and Jeanne and Scott are very careful when they tell you the rules for assignment and passing without explicit casting.

The material on operators, types and casting shows:
byte --> short --> char --> int --> long --> float --> double

Which I know from my earlier studies (Sybex, Wiley Enthuware...) not to be true for assignment at least....

jshell> char c1 = b1;
|  Error:
|  incompatible types: java.lang.Byte cannot be converted to char
|  char c1 = b1;
|            ^^

jshell> char c1 = s2;
|  Error:
|  incompatible types: java.lang.Short cannot be converted to char
|  char c1 = s2;
|            ^^
 
Ron McLeod
Marshal
Posts: 3457
493
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is b1 a byte or Byte?
 
Jesse Silverman
Ranch Foreman
Posts: 323
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was rushing in JShell, it works (fails) the same with or without the auto-boxing.

jshell> char c1 = b1;
|  Error:
|  incompatible types: possible lossy conversion from byte to char
|  char c1 = b1;
|            ^^
 
Jesse Silverman
Ranch Foreman
Posts: 323
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see what you were going for, there are trick cases around auto-boxing.

Widening followed by auto-boxing can't be done in one step:

jshell> Integer I = b1;
|  Error:
|  incompatible types: byte cannot be converted to java.lang.Integer
|  Integer I = b1;
|              ^^

Auto-boxing followed by widening can be (but is rarely useful except for exam question purposes?):
jshell> Number N = b1;
N ==> 3

One should also remember that while one can always assign a primitive int to a long without a cast, it ain't true for boxed values:
jshell> Long L = I;
|  Error:
|  incompatible types: java.lang.Integer cannot be converted to java.lang.Long
|  Long L = I;
|           ^

This is much more subtle than the misinformation I claimed the video implied, tho both are real things...all are important until Project Valhalla goes production...
 
Jesse Silverman
Ranch Foreman
Posts: 323
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll limit it to just a fragment of a sentence that seems whacked.

Explaining why you don't need casts for ++ and -- of types smaller than int, they use the oddest phrase 'operators ++ and -- recursively modify same variable, without changing its type'

This makes sense to me if we change 'recursively' to 'reflexively' else ??? not so much.

I'd say it was just a typo, but the wording appears in both the video presentation and the practice materials.

I checked the JLS to see if the words recursive or recursively are ever applied to the ++ and -- operators, it appears not.
 
Ron McLeod
Marshal
Posts: 3457
493
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:I was rushing in JShell, it works (fails) the same with or without the auto-boxing.

jshell> char c1 = b1;
|  Error:
|  incompatible types: possible lossy conversion from byte to char
|  char c1 = b1;
|            ^^


Different failure - this time it is complaining because byte in a signed type and char is an unsigned type, and the value of byte could be a negative value.

The byte value can effectively be treated as a unsigned value byte by masking-off the byte's 8 bits during the conversion:
This works because during the conversion from byte to char, the byte value is first widened to an (potentially negative) int value, and then bitwise AND'ed with the mask to remove the signedness (everything other than the lower 8 bits zero'ed out), and then finally narrowed to a char:
 
Jesse Silverman
Ranch Foreman
Posts: 323
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ron:

Thanks, and I do get it, the take home is that it still absolutely requires an explicit cast, and I maintain that the line:

'byte --> short --> char --> int --> long --> float --> double'
should not appear in any certification exam prep material anywhere.

I'm done with the first two Units / (11% of total) and there is material in the third Unit that I have literally never done, for example, I always danced around BigInteger without ever using it, I believe even in toy programs, HackerRank, etc. -- I've known it existed, just never used it.

So I think I'll be plowing ahead with their Unit 3....
 
Greenhorn
Posts: 6
Spring Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:One of the only things I learned from the first section of the course, which I think the Enthuware 815 material had pointed out, was that you can no longer start variables with _.
On the quiz for section one, they had 'which variable name is illegal?' and there was a choice that began with a numeric digit, and another that began with an underscore.

I guessed the question was out of date, so since it would only let me mark one, I chose the one that began with a numeric digit.

So far, the content is _whelming.

I appreciate that it is being offered for free, and appreciate our friends at Sybex, Enthuware and the host of people helping to educate others for free even more than before.



Jesse, a single underscore is illegal since Java 9.  You are still allowed to start a variable name with _ or $.
For example, in Java 8, this compiles:
int _ = 1;
but with a warning: (use of '_' as an identifier might not be supported in releases after Java SE 8)
 
Rancher
Posts: 155
5
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am also studying with this course and I find it pretty nice. Sometimes there are some missunderstandings in questions for me because more answers seems to be right but in general it's a nice course, I am at chapter 10 already. I only have problems in undestanding English.
 
Mike Savvy
Rancher
Posts: 155
5
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way there are hundreds of errors in sybex study guides...

Actually I find that this Oracle course which is free can be helpful in preparation for java certification only for persons with java or at least programming experience.
It would be better if the exercises which are explained in videos are given, but they are not. So these explanations are useless for me because I do not know the context. There is literally just ~1h video for 1 chapter and this may be enough only for somebody who just want to repeat or review the stuff.
But these lectures are just a small part of full course, of course.
 
Jesse Silverman
Ranch Foreman
Posts: 323
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I felt like most of the errors in the Sybex book that would be at the level of the ones I called out are mostly listed in the errata:
https://www.selikoff.net/ocp11-1/
https://www.selikoff.net/ocp11-2/

There are a few wording quibbles that I complained about here and there that didn't make it into the errata but none too serious.

You are well ahead of me at Unit 10, halfway thru.

Cool.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to learn Java.Can you help me?
 
Jesse Silverman
Ranch Foreman
Posts: 323
8
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

There are many people here who can answer specific questions about particular aspects of Java, or to recommend various study materials or sources.

Could you be more specific?  The course we are talking about in this thread is currently free, normally expensive, and is appropriate for individuals who have some decent knowledge of programming in general, but little experience with Java, or some experience with Java as their only programming knowledge.

What is your current knowledge and experience, and are you seeking to achieve some particular certification or to build some specific project?
 
Marshal
Posts: 72406
315
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you find a University course anywhere near you? I firmly believe that a good course/teaching taught by somebody who knows how to program is the best way to learn. Or can you find a company you could work for who will teach you?

And welcome to the Ranch (again).
 
Jesse Silverman
Ranch Foreman
Posts: 323
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even before COVID, a high percentage of these courses have gone online.

I have two good friends who taught in-person for many years as part of continuing education / professional studies, and both have ceased activity recently.

Of course, everything you said applies to both pre-recorded and MOOC courses with live (but not in physical presence) teachers as well.

There is an advantage in having someone who is paid to answer all your questions.
 
Mike Savvy
Rancher
Posts: 155
5
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is that right, that they say class for an Interface?
Untitled.png
[Thumbnail for Untitled.png]
 
expectation is the root of all heartache - shakespeare. tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic