Naziru Gelajo

Ranch Hand
+ Follow
since Dec 21, 2015
Naziru likes ...
Netbeans IDE Java Ubuntu
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Naziru Gelajo

I haven't read through your entire source code but I did notice one odd thing in your main program. It is under the For loop that creates a new object called FC and then adds the same object over and over again in the For loop.

I do not believe that your intention is to create FC over and over again, but a different object each time is that correct? If that is the case, I advise that you revisit and revise that portion of your code.
5 years ago
Don't beat up on yourself. It is counter-intuitive and counter-productive (I should take my own advice ) with that said, With Java, get the latest java jdk for version 8. I think it's 1.8.0_171. Install Netbeans of IntelliJ. There are tons of online Java courses taught in many parts of the world.

Alternatively, you could take some Community College courses or if you would rather not, you could always use some LMS platform like Edureka.

Whilst books are great, I believe that the best way to learn is by doing. Community Colleges and Online Learning Platforms like edureka, edX, coursera, etc. give you assignments to confirm the skills you have added to your skillset. Again, don't get discouraged. We all have those moments.
5 years ago
Well, you are close

My suggestions for you is that you are going to be going through the array in linear time (sequentially). What I suggest is that you initialize the first value of the array to be the largest item prior to iterating through the array. Once you iterate or loop through the array, check every value against the max value and if it is larger than the max value, then that value would become the new max value. Good luck!
5 years ago
You need to implement/override your own version of the toString() method. You would have to specify what you want to be displayed.
5 years ago
You need to use what is known as Encapsulation in your Object-Oriented Programming design. You need to set your instance variables to private and then use what is known as getters and setters to invoke your variables in another class. Please let me know if you need further clarification.
5 years ago

Akshayyha Krishnamurthy wrote: I learned that whenever there is an instantiation of a subclass, then implicitly compiler will add super() in the subclass's default constructor which in turn invokes the parent class constructor. So in this case too why didn't it produce a runtime error even?
Also, there's a compile-time error when I declare a constructor for the interface.
Could anyone help me understand this ?

It is because you are calling from Object (the Parent or Superclass to call classes).

Moderator edit: please quote only relevant parts, not the entire post.
5 years ago

Al Hobbs wrote:Have you looked at the logs to see what's happening? Also, are you using NetBeans? Looks like NetBeans.

Yep, I am using Netbeans. This is the only thing I find in the logs:

5 years ago

Al Hobbs wrote:Is your code throwing an exception or what?

No exception is being thrown. It just does not save object data to the table. It successfully creates the table with the proper columns however.
5 years ago
Hello, I am having a problem in which my Spring Hibernate Application is not storing created objects into a Database Table via the Hibernate template. Here is my code

Hibernate Mapping File:

Application Context:

POJO/Bean Class:

DAO class:

Main class (Instantiation of Objects to be stored in DB Table):
5 years ago
Hello everyone,

I am able to successfully create and insert entries in a table via Hibernate, however for some reason I am unable to update records within my database created by Hibernate. I created an individual method for update and delete as seen below (NOTE: I have also included the POJO class I created):

As aforementioned, the table is successfully created in a MySQL database. However, I am unable to update an objects Marks (grade) via my HQL query:

The purpose of the update method is to effectively take one of the records in the table via the id column and updates the element in the marks column.
Hello, I am attempting to find the cyclomatic complexity for a method in code. I have numbered the lines to represent nodes, although I'm not sure if it's 100% correct:

Here is a flow graph, again, I would like to get some feedback about whether I am correct or incorrect. Thanks!

if the img html tag does not work, here is my flow graph:!AvALpeZvjVx7geByBUjQVgZEZs2Lag
6 years ago
To find if an element exists within an array, you can do it a couple of simple ways on top of my head.

One is doing a linear search on a small array like the one provided, it won't take too long. However, assuming you had a dataset or an array millions of numbers. I would use a binary search. However, for a binary search to be effective, all numbers in the array must be sorted.
6 years ago
Hello, I'm trying to figure out how to fling an ImageView within a RelativeLayout in a direction that won't go off the screen. If you view my YouTube video for my project, the ball is not travelling very far in this penalty shootout mini-game.

Are there any good tutorials on what to do with the soccerball? or any hints on how to make sure it goes towards the goal and no where else? Thanks!
6 years ago
Hello, a couple of things please use the [code][/code] html built-in tags when posting code. They are located within the code posting interface. Also, I can attribute the reason why the code ends is due to the Scanner class and the way it handles input.
6 years ago