We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

yoyo • 1 year ago

The question about str.equals and what if str is null. That's so tricky I completely forgot about it. Very good point, thanks

Suresh Vaja • 3 years ago

TryExperts is a Marketplace of Experts Across the World. - https://www.tryexperts.com/

x • 3 years ago

I'm recommending Matt Urban's two coding books: "Top 30 JAVA Interview Coding Tasks" (https://www.net-boss.org/sh... and "Top 30 SQL Interview Coding Tasks" (https://www.net-boss.org/sh....
Great article tho.

George • 3 years ago

Nice article. I used to read books by Matt Urban about programming and preparing for the interviews at the same time. Very useful read: "Top 30 JAVA Interview Coding Tasks" (https://www.net-boss.org/sh... and "Top 30 SQL Interview Coding Tasks" (https://www.net-boss.org/sh....

Matt • 3 years ago

My advice is also recommending Matthew Urban's book "Top 30 JAVA Interview Coding Tasks" (https://www.net-boss.org/sh... and "Top 30 SQL Interview Coding Tasks" (https://www.net-boss.org/sh.... Enjoy!

Corey • 3 years ago

This is one of the best books in coding, by Matthew Urban: Top 30 JAVA Interview Coding Tasks (https://www.net-boss.org/sh... and Top 30 SQL Interview Coding Tasks (https://www.net-boss.org/sh....
Easy read, great tips, well explained.

Garry • 3 years ago

Also my favorite books when it comes to coding are always Matthew Urban's books (https://www.net-boss.org/sh... and https://www.net-boss.org/sh..., very simple and yet there is everything I need, specially when studying/ preparing for exam or interview. Really worth checking this guy.

Stefan • 3 years ago

A while ago I came across Matthew Urban's coding books (Top 30 JAVA Interview Coding Tasks on https://www.net-boss.org/sh... and Top 30 SQL Interview Coding Tasks on https://www.net-boss.org/sh.... Very good read and excellent tips on programming. Thanks!

Giana • 3 years ago

I also always look for Matthew Urban's books. very consistent with good subject, well explained, easy to follow. Can recommend for newbies but also for those who prepare for the exams/ interviews: https://www.net-boss.org/sh... and https://www.net-boss.org/sh...

Peter • 4 years ago

Best book on coding: Matthew Urban "TOP 30 Java Interview Coding Tasks" and "TOP 30 SQL Interview Coding Tasks" (https://www.net-boss.org/sh... and https://www.net-boss.org/sh...

sarah • 3 years ago

I reached out to Matthew Urban's books. With a very good explanation of topics re programming, this was a great choice and would recommend to anyone looking for help in regards to Java or SQL.
Top 30 JAVA Interview Coding Tasks (https://www.net-boss.org/sh... and
Top 30 SQL Interview Coding Tasks (https://www.net-boss.org/sh....

Mags • 4 years ago

Recommending Mathew Urban's books: Top 30 JAVA Interview Coding Tasks (https://www.net-boss.org/sh... and Top 30 SQL Interview Coding Tasks (https://www.net-boss.org/sh.... Very good list of questions and very useful.

Peter • 4 years ago

Great examples of coding questions. Most articles like this just list a bunch of theoretical textbook questions that interviewers don't really focus on much. My only complaint is that these tasks are too simple. I recommend trying some slightly more engaging programming examples like these Java interview questions.

Gary • 4 years ago

Another good review, also recommending Matthew Urban's books. https://www.net-boss.org/sh... & https://www.net-boss.org/sh...

Nathan • 4 years ago

Agree. Good books and guides.

Tom • 5 years ago

I recommend "TOP 30 Java Interview Coding Tasks" by Matt Urban, good, quick, easy read.

Troy • 4 years ago

Really great when it comes to Java coding. My best choice while preparing for the interview. https://www.net-boss.org/sh...

Clide • 4 years ago

Hi Tom. Thanks for the recommendation, also to whomever need to prepare, the best book so far. Most common questions indeed. thanks.

Ben • 4 years ago

Hi Tom, great recommendation. Thanks for this.

Ken • 4 years ago

I bought it as well. Thanks for the tip, this book is great. I really didn't have time to browse all the web for the most questions. I have it all there. Thanks. (https://www.amazon.com/TOP-...

Anna • 5 years ago

This is a great summary, but there are so many websites.. While searching for the most common interview questions in Java coding I came across the book by Matthew Urban "TOP 30 Java Interview Coding Tasks", It contains only 30 but most popular coding tasks used by Java developers during a job interview and it was worth having this book.
I bought mine on Amazon in kindle version: https://www.amazon.com/TOP-....

Have fun when preparing :)

Grant • 4 years ago

My advice is also recommending Matthew Urban's book "Top 30 JAVA Interview Coding Tasks" (https://www.net-boss.org/sh... and "Top 30 SQL Interview Coding Tasks" (https://www.net-boss.org/sh.... Enjoy!

Luc • 4 years ago

Great guide, great list. Thanks for the recommendation Anna. https://www.net-boss.org/sh...

Peter • 4 years ago

Hi Anna, thanks for the recommendation, book was really helpful. Great list of questions (https://www.net-boss.org/sh...

Brian • 4 years ago

Hi Anna, awesome book. recommended this to my friend too and he was super happy to buy and not to have to waste time. Thanks a lot! (https://www.amazon.com/TOP-...

Larry • 5 years ago

Hi Anna,

thank you for the tip. I bought the book and it was great. Seems like the interviews are really based on this kind of books. The book itself is very concise and well written, it's worth having it on a bookshelf.

koki • 2 years ago

Why is the module not working?

this is the code:

import java.util.Scanner;
public class Main {
Scanner scanner = new Scanner(System.in);
private String sTnm;
private String sTdI;
private String[] mDnm= new String[3];
private double[]aSSi1 = new double[3];
private double[]aSSi2 = new double[3];
private int sMnu;
private double[] AvG = new double[3];

public Main() {
}

public Main(String sTnm ,String sTdI, String mDnm[],double aSSi1[],double aSSi2[],int sMnu){
this.sTnm = sTnm;
this.sTdI = sTdI;
this.mDnm= mDnm;
this.aSSi1 = aSSi1;
this.aSSi2= aSSi2;
this.sMnu= sMnu;
}

public String getsTnm() {
return sTnm;
}

public void setsTnm( String sTnm) {

this.sTnm = sTnm;
}

public String getsTdI() {

return sTdI;
}

public void setsTdI(String sTdI) {
this.sTdI =sTdI;
}

public String[] getmDnm() {
return mDnm;
}

public int getsMnu() {
return sMnu;
}

public void setsMnu(int sMnu) {
this.sMnu =sMnu;
}

public double[] getaSSi1() {
return aSSi1;
}

public double[] getaSSi2() {
return aSSi2;
}

public void hI1() {
for(int a=0; a<assi1.length; a++)="" {="" if="" (assi1[0]<assi1[a])="" {="" double="" et="aSSi1[a];" assi1[a]="aSSi1[0];" et="aSSi1[0];" }="" }="" }="" public="" void="" hi2()="" {="" for(int="" n="0;" n<assi2.length;="" n++)="" {="" if="" (assi2[0]<assi2[n])="" {="" double="" et="aSSi2[n];" assi2[n]="aSSi2[0];" et="aSSi2[0];" }="" }="" }="" public="" void="" hi()="" {="" if="" (assi1[0]<assi2[0])="" {="" system.out.println(assi1[0]);="" }="" else="" if="" (assi2[0]<assi1[0])="" {="" system.out.println(assi2[0]);="" }="" }="" public="" void="" avg()="" {="" double="" tot="0;" for(int="" k="0" ;k<3;k++)="" {="" tot="aSSi1[k]+aSSi2[k];" this.avg[k]="Tot/2;" }="" }="" public="" void="" writealltheinfo()="" {="" system.out.println("="" ");="" system.out.println("std="" info");="" system.out.println("std="" name:"="" +="" this.getstnm());="" system.out.println("std="" id:"="" +="" this.getstdi());="" for(int="" k="0" ;k<3;k++)="" {="" system.out.println("module="" name:"="" +="" this.getmdnm()="" [k]);="" system.out.println("assignment="" #1="" mark:"="" +="" this.getassi1()="" [k]);="" system.out.println("assignment="" #2="" mark:"="" +="" this.getassi2()="" [k]);="" }="" system.out.println("enter="" in="" which="" semester:"="" +="" this.getsmnu());="" system.out.print("the="" highest="" score="" in="" both="" assignments="" was:");="" hi();="" system.out.println("="" ");="" avg();="" for="" (int="" k="0;k&lt;3;k++)" {="" system.out.println("="" the="" avrege"+getmdnm()="" [k]+this.avg[k]);="" }="" system.out.println("sucsecfully="" have="" finish:");="" for="" (int="" k="0;k&lt;3;k++)" {="" if="" (avg[k]="">=50) {
System.out.println(mDnm);
}
}
}

public static void main(String []args){
int a = 0;
double[] array = new double [6];
char select;
Main et=new Main();
Scanner sc=new Scanner(System.in);

do {
System.out.println("enter the student name");
String name = sc.nextLine();
et.setsTnm(name);

System.out.println("enter the student ID");
String id = sc.nextLine();
et.setsTdI(id);

System.out.println("enter the student semester");
int semester = sc.nextInt();
et.setsMnu(semester);

a=0;
while(a<3){
System.out.println("enter module name");
et.mDnm[a] = sc.nextLine();

System.out.println("Enter number of assignments 1 ");
et.aSSi1[a] = sc.nextInt();
System.out.println("Enter number of assignments 2 ");
et.aSSi2[a] = sc.nextInt();
a++;

et.hI1();
et.hI2();
et.hI();
}
et.writealltheinfo();
System.out.println(" if you want to repeat press key'A' , select any other key to exist");
select=sc.next().charAt(0);
} while (select =='a'||select=='A' );
}
}