Do you think Java is getting down these days?

Software Development is a dynamic field.

In Software Industry there are lots of new technologies that come-in emerge as giants, rise to fame and then eventually fade away.

Developers need to constantly be learning new skills to stay relevant.

According to TIOBE Index for July 2018, JAVA still tops the chart followed by CC++ and Python.

But, yes it is true that JAVA is getting down these days with python emerging as next giant and growing at a brisk rate.

Java is over 2 decades old, used by millions of developers and billions of devices worldwide, and able to run on any hardware and operating system through the Java Virtual Machine. All Android apps are based on Java and 90 percent of Fortune 500 companies use Java as a server-side language for backend development but the number of jobs have decreased over-time.

One the other hand Python is a general-purpose programming language used for web development and as a support language for software developers. It’s also widely used in scientific computing, data mining and machine learning. The continued growth and demand for machine learning developers may be driving the popularity of Python.

Hence, we can conclude that the boom of Artificial Intelligence, Machine Learning and Data Mining has led to the downfall of JAVA. But then again, it won’t be obsolete.

Is Java certification needed for a job?

Is Java certification needed or required for a job? Well, If you are planning to get a job that’s related to Java,  certifications may or can help you get the job. It is not really necessary, but it is definitely a plus.

Here are some screenshots that show how valuable certifications are:

If you are looking for any guidance on preparing for Java certification, please send me a message or comment here.

I am also really happy to announce some very exciting news: to celebrate the imminent release of Spring 5 and Java 9 we launched our simulators SALE CAMPAIGN. We halved the price of our simulators at www.springmockexams.com and www.javamockexams.com for limited time only.

If the audience is interested in accessing our price offer, they can take a look here bit.ly/SMEBP and here bit.ly/JMEBP

If you are interested in collaborating with us, you can join our partner program at bit.ly/SMEPART  and here bit.ly/JMEPART

Which is the best, most recognized Java certification?

Oracle certified java certification receives the highest value as it is one of the most typical certification and thus hard to crack. It requires comprehensive knowledge of Java technologies. Oracle certification has been known to give a salary hike, position elevation or job proficiency. Oracle offers different stages of certification – junior, professional, associate, and experts, specialist. Once you got this certification, many doors related to Java technology like software development, application development, will open for you.

Java certification offered by oracle:

●Oracle Certified Associate, Java SE 7 Programmer (OCAJP 7).

●Oracle Certified Associate, Java SE 8 Programmer (OCAJP 8).

●Oracle Certified Professional, Java SE 7 Programmer (OCPJP 7).

●Oracle Certified Professional, Java SE 8 Programmer (OCPJP 8).

●Oracle Certified Professional, Java SE 9 Programmer (OCPJP 9).

To prepare for this certification, you need proper programming techniques which you can learn by doing Java certification course or by taking java mock exams.

Which Java Certification course should I do?

Are you new to Java programming world?

If the answer is Yes, then you have the following two certifications as the first one to crack for decorate your profiles.

  • Oracle Certified Associate, Java Programmer I (OCAJP)
  • Oracle Certified Professional, Java Programmer II (OCPJP)

The above two certifications would give you good understanding the Java programming fundamentals and get you a Job. Note that OCAJP is the entry level and mandatory for writing any of the Java certifications.

Are you already working with Java and enhance your career?

If the answer is Yes, then you have the expert level exams to improve your skills. There are various expert level exams:

  • OCEJWCD – JSP and Servlets
  • OCEJSFD – Java Server Faces (JSF)
  • OCEJWSD – Web Services
  • OCEJPAD – Java Persistence API (JPA)
  • OCEEJBD – Enterprise Java Beans (EJB)

Note: all the above certifications would require the OCAJP as the mandatory certification.

Are you a Java developer with more than 10 years of experience?

If the answer is Yes, then you would probably have to think about writing the Oracle Certified Master, Java EE Enterprise Architect (OCMJEA) exam. This exam not require any basic certification as the mandatory. You can directly write this certification. If you could pass this exam, you will be able to handle any kind of Java projects.

Are you looking for Java certification practice questions?

If the answer is Yes, then you have the option to buy good commercial mock exam simulators like JavaMockexams. With this you will be able to practice several mock exams before the exam. These simulators would provide the questions that are very similar to the real exam.

Hope this helps!!

What are the learning stages of Java?

The learning stages of Java depends on the person who’s trying to learn it. It can be a tough journey or a smooth sailing one. Whatever your learning journey is, please do not quit. Believe me, it will be all worth it.

Take time to read this one from a self-taught programmer, Carlos Hunter, regarding his thoughts on the learning stages of Java.

“Assuming you’ve never programmed before:

Kinda like this:

  1. Fun, I’m learning to output Hello World. But what the heck does “static void main(String[] args)” mean?
  2. Ok, so math operations are easy, they’re as the’ve always been. I can also declare ints, chars, bools…
  3. Learn loops and conditional. Not difficult.
  4. Learn to declare and use methods. Cool.
  5. Learn more things like arrays, classes… Multidimensional arrays..?
  6. Learn strange things like polymorphism, abstract classes, inheritance, constructors… May be difficult for beginners.
  7. Think “please stop”
  8. Learn more new concepts and language stuff, some keywords.
  9. Get tired of it
  10. Learn about exceptions
  11. Learn about threads
  12. Learn to work with files.
  13. You know most of what you need but there are some concepts you don’t know very well so you are useless. Everything seems to be very hard to learn.
  14. Try to make something, but you are going to be the next five hours debugging.
  15. Re-learn everything again
  16. Feel you’ll never do a program that runs with no bugs before.
  17. Spend more hours debugging while you realize little facts you didn’t know.
  18. Almost give up, or give up
  19. Discover any question you had about programming is already in stackoverflow
  20. Get banned from asking in stackoverflow for a week
  21. Break everything trying to do anything
  22. Find some good book
  23. Learn new stuff like streams, etcetera. If you don’t speak English as a native it may be very difficult.
  24. Say kill me please
  25. Hard learning of getting accustomed to coding
  26. Learn to make GUIs, because that’s what we always wanted, right?
  27. Trying to do some project you found in a tutorial.
  28. Fail.
  29. Just copy the code.
  30. No, not copy-paste, type it.
  31. Implement new things using what you learnt.
  32. This is where you start to learn to program.
  33. Debug and program some more…
  34. This will take a while.
  35. More debugging.
  36. At this point you probably got used to some java important packages.
  37. MORE DEBUGGING.
  38. Add things to your GUI program.
  39. Continue programming.
  40. You ask yourself things like why abstract classes exist if there are interfaces.
  41. Suffer.
  42. Now you should be comfortable with Java.
  43. Continue getting accustomed to program with Java.
  44. Now you feel you can call yourself a programmer, after at (the very) least three months of everyday hard work since starting.
  45. Read code and improve your terrible skill.
  46. Get used to it.
  47. Realize there are some stuff that you weren’t taught
  48. Learn what you need
  49. Let the time pass (“What do I do now?”)
  50. You know Java.
  51. Learn boring sorting algorithms, etc, whatever you want.
  52. Keep learning.

End.”

What are some things every Java developer should know?

The foremost thing every Java developer should know is that the language is not “finished”. After a period of relatively slow development, updates have accelerated in recent years leading to smaller but more frequent feature drops. JDK 11 will be released this year, and each new release carries with it new enhancements, features, updates to the standard library and more. Hence, to me, the most important thing to know is the limit of one’s knowledge (and a desire to expand it).

Having said that, here are some of the things I have learned over the years that have served me well.

1. Get familiar with the Java Class Library

Shipping with the JVM itself, this library is probably the most well-debugged Java library available. Pretty much anyone using Java is debugging it. As such, leveraging it as much as possible is a good start on the way to not have too many bugs.

Having said that, there are quirks, some of which are surprising. My personal favourite, and an item that often flies under the radar, is spurious wakeup, a decades-old artifact that permeates many imperative threaded programming languages. It is documented in depthrepeatedly in the Java documentation, yet I had missed it and most people I introduce to it are unaware of it as it is one of those bugs that mostly only happens on a heavily loaded system and thus is easily missed.

Additionally, it follows from the Java language evolution that so does the JCL. This adds an ongoing — but very useful — effort to update one’s knowledge of the JCL as new features are added. For example, the introduction of Lambda expressions in Java was a nice addition from a syntax point of view, but it was made all the better by the JCL adding new methods to all old interfaces that effectively eliminated the need for many types of common boilerplate, such as Map.computeIfAbsent().

2. Learn how to write documentation properly

One of the most-frequently misunderstood parts of the JCL I encounter with developers is Comparator. This is also one of the most striking ones, as it is ostensibly an extremely simple interface: one function that says if an element comes before or after another element. Let’s have a look at the javadoc for the all-important compare function:

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

In the foregoing description, the notation sgn(expression) designates the mathematical signum function, which is defined to return one of -1, 0, or 1 according to whether the value of expression is negative, zero or positive.

The implementor must ensure that sgn(compare(x, y)) == -sgn(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

Actually, it goes on for three more paragraphs, each carving out a more specific use-case, and none of which bothering to provide an example of the more-and-more theoretical description provided.

The end result is that most developers I know of have effectively given up on this documentation and will just run the comparison in a test case to see if they got it the right way around or not (it’s a 50–50 chance anyway).

Compare it, for example, with the documentation for String.substring() which spends far less time being theoretical, ending up providing concrete examples and thus allowing the reader to quickly grasp the essence of the method.

3. Threading is the Dark Side (mostly). See how to avoid using threads explicitly.

Much work has been done on the Java side to provide methods that abstract away threading. Constructs such as ForkJoinPool, implicitly used when using Stream.parallel(), and JCL packages such as java.nio/2 deal with different ways of avoiding to use/create multiple threads.

This trend has been predicated by multiple avenues, both Java and otherwise. For example, RxJava has been preaching this pattern for a while. It’s also one of the reasons for the popularity of NodeJS. There are many advantages of doing it, and it is a testament to the JVM that it can support different approaches, gaining the advantages of them.

4. Don’t try to outsmart the JVM.

Java, the JVM and the JCL have had contributions from many smart people. Yes, some of the parts make little sense, and others have been redone multiple times because of inherent flaws; however, on the whole, a lot of thought has gone into it. It’s possible, though unlikely, to outsmart it.

An excellent source on this is the JVM Anatomy Park, a strongly recommended read on how the JVM does cool and smart stuff under the hood for you. The one I’ll choose to highlight (but there are more, and do have a look at them all!) is lock elision. In short, it’s a way for the JVM to completely eliminate synchronized blocks that it determines don’t perform useful locking. As a developer one can therefore write correct code while the JVM makes sure it is performant.

A related issue would be the synchronized keyword. A younger, more naïve me would come armed with the theory of locking and figure out a situation where a Spinlock would be better than a Mutex. That’s great and all, until one figures out (after not seeing any performance improvement) that Java will automatically use both spinlock and mutex for synchronized depending on how it is performing.

Of course there are still cases for judicial use of synchronisation and reasons for when to do what. But outsmarting the JVM is almost never a good reason to write code.

5. Java has loads of tooling, for a good reason. Leverage it!

Perhaps one of the biggest benefits that come with Java as such an established language is the veritable cornucopia of tools associated with it, from static code analysis, to runtime configuration, to convention libraries and pretty much everything under the sun.

Any good Java developer today should know how to leverage that code. Doing this has two benefits.

First, it makes it easier to debug code, find errors before they reach production, find them afterwards and optimise the code. There is no reason to make these tasks anything but easier.

Second, and far more dear to my heart, is that leveraging all this existing code makes one’s own codebase all that much smaller. Assuming the tooling chosen is good (e.g. Spring) then that ideally means less code, less bugs.

Should a beginner focus more on Core Java or Spring?

For me, I think beginners should concentrate more on Core Java first and for in-depth knowledge of Core Java and its core features, you may study and practice reading Decodejava.com presenting simple and easy Java tutorial.

For beginners they have covered most of the Java features –

  • Control Statements -Control statements like if, if-else, switch, while loop, break, continue etc control the flow of our program. To know more about control statements, starting with if statement, please read Java if statement
  • Java Exceptions– Exception is an unusual exceptional condition or a runtime error, which occurs only during the runtime of a Java program. To know about Java Exceptions and how they are caused in a Java program, you may read Exception Handling in Java
  • String – String is a nothing but a sequence of characters within double quotes. To know about String and its various important methods, please follow Java String Class – Decodejava.com
  • File Input/Output – File Input/Output classes are used to read/write data from the files. To know more about file input/output and its important classes with short code examples , please follow – Java File Class – Decodejava.com
  • Thread – A thread is a program in execution that is performing some specific task. Thread is the most important feature of Core Java and to know more Thread and its features with easy code examples, please read Threads in Java – Decodejava.com
  • Applet – An applet is a Java program that can be transported over the internet and executed by a Java enabled web-browser. To know more about Applet and it’s important features, you may read Java Applet Class- Decodejava.com
  • Collection Framework – Collection Framework provides important interfaces and classes using which we can manage a group of objects. Collections comes in the advance topics of Core Java but you shouldn’t miss it. To know more about every Collection classes with short code examples, you may read ArrayList in Java- Decodejava.com
  • Swing package- Swing framework gives us an ability to create window based applications and its easy to use graphical user interface(GUI)For more on Swing and its classes with easy code examples, you may follow Java Swing- Decodejava.com

Hope this helps and don’t forget there are no shortcuts to success, so practice your Java programming as much as possible to excel.

By the way, I am also really happy to announce some very exciting news: to celebrate the imminent release of Spring 5 and Java 9,  we launched our simulators SALE CAMPAIGN. We halved the price of our simulators at www.springmockexams.com and www.javamockexams.com for limited time only. Take a look here bit.ly/SMEBP and here bit.ly/JMEBP

If you are interested in collaborating with us, you can join our partner program at bit.ly/SMEPART  and here bit.ly/JMEPART

 

Top 5 Spring Boot Interview Questions with Answers for Java/JEE Programmers 2018

Here is our top 5 list of the most common Spring Boot Interview Questions based on our recent survey.

1. What is Spring Boot? Why should we use it?

Spring Boot is a Java framework from Sring umbrella which is developed to simplify the use of Spring Framework for Java development. It helps in automation, configuration, and dependencies.

Why should we use it? It provides a lot of convenience by auto-configuration which helps improve productivity because it allows developers and programmers to focus on writing the business logic.

2. What is starter dependency in Spring Boot? 

This question is usually asked because after examining several Spring-based projects, they noticed that there is always some set of libraries which are used together e.g. Spring MVC with Jackson for creating RESTful web services. Since declaring a dependency in Maven’s pom.xml is difficult, they combined many libraries into one based upon functionality and created this starter package.

This saves you a lot of hassles from declaring many dependencies. Moreover, frees you from compatibility and version mismatch issue.

3. What is Spring Initializer and why should you use it?

It helps in initial setup – it’s a web application that helps you to create initial Spring boot project structure and provides Maven or Gradle build file to build your code.

4. Where do you define properties in Spring Boot application?

You can define related properties into a file called application.properties. This can be done manually or you can use Spring Initializer to create this file, albeit empty.

You don’t need to do any special configuration to instruct Spring Boot load this file. If it exists in classpath then Spring Boot automatically loads it and configure itself and application code according.

5. What is the difference between an embedded container and a WAR?

The main difference between these two is that you can run Spring Boot application as a JAR from the command prompt without setting up a web server. To run a WAR file, you need to set up a web server.

Thanks for reading our first article so far. If you like these Spring Boot Interview Questions then please share with your friends and colleagues. If you have any feedback or doubt then please leave us a comment.

By the way, I am also really happy to announce some very exciting news: to celebrate the imminent release of Spring 5 and Java 9,  we launched our simulators SALE CAMPAIGN. We halved the price of our simulators at www.springmockexams.com and www.javamockexams.com for limited time only. Take a look here bit.ly/SMEBP and here bit.ly/JMEBP

If you are interested in collaborating with us, you can join our partner program at bit.ly/SMEPART  and here bit.ly/JMEPART