Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

ImDinesh Sharma

Greenhorn
+ Follow
since Jul 24, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ImDinesh Sharma

My goal is to create a program that checks a sentence whether or not a pangram




My logic says that i need to compare each letter from each word of Pangram with each index position of Alphabet, if i were to compare two characters array with each letters separately i would have done that with nesting for loop but here its a string so i need to convert the string to characters first.

And for that i know i have the charAt(index position) method.

This is all i know but this knowledge is not enough in order to accomplish the goal and i just don't know how to put together these things and achieve the goal

This is just a basic program which doesn't even require the input from user
1 year ago
Wow

Thank you @Junilu Lacar

Great questions

Those have really opened my eyes to software development

Exactly what i was looking for

"It's not about how fast you write many softwares, but to maximize the outcome and impact you get from what you choose to build" This one is great!

Thanks again


1 year ago
Hello

It's important to have a plan for any project your working on

suppose your project manager and designer just comes to you and discuss about application they want you as developer to build.

What kind of question would you ask yourself in that situation?

for example

How many classes do i need to start with?

do i need to take help of other software developer in this ?

I know sometimes the process won't go according to plan but still having a plan is good to stay focused
1 year ago
I m starting in Mobile application development
iOS and Android
Swift and Java(these two I know)
throughout my career, will I ever be dealing with anything that will be SQL?
I know about SQLite that used in Android apps, isn't that enough?
1 year ago

Angus Ferguson wrote:

It can get much more elaborated and it offers the posibility to reduce duplicated code improving readibility, scalability and modularity.



Got it!

Lemmi show you an example



If i create a method in ReturnStatements class but i call it in different class ReturnStatements2, will there be any additional things to the process?
1 year ago

Angus Ferguson wrote:Using RETURN is useful when you want to retrieve and use the output of the method which is returning the value in a wider scope. For example, if you write a method calculateSum() and it returns the value 5 you could use that value 5 together with another methods like multiply() in order to orchestrate them and solve a bigger problem.



So what you mean is We can solve a bigger problem using two methods with a single return type right
1 year ago
I only know a tiny thing about this which is this

When we create a method, it provides the option to return some data in many forms such as int, boolean, string etc.

But

Where it returns

Why and where its useful to use this RETURN statement in method

Please could you explain this with simplest and easy way
1 year ago

Campbell Ritchie wrote:TextArea1 is a bad name for a class; it doesn't constitute a text area, but uses a text area, which is different. I might have called it TextAreaDemo. Or I might have called it something different.
You are indenting your code incorrectly: look at lines 26‑31. I think they should be formatted like this, if you want to keep the lines very short:-But that won't correct your compile‑time error. One line has s and the other has S; one of them will be wrong and that will cause a different compile‑time error. S is probably correct.



exactly!, go got it!

public class TextArea1 implements


this is improper

(scrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
         panel.add(scroller);



the "s" should be in UPPER CASE

thanks
1 year ago


what's wrong with the code. please tell
1 year ago

Rob Camick wrote:No that code is still wrong.



As i m going through the next steps in book, i think i am improving on the logic. The code i just showed you is working just fine and i am getting the Y's and How's. I also did some experiments and it worked.

I went through the tutorial but it consists some new stuff that i must know in the first place. or you can also say that I am not getting it THE WAY IT EXPLAINED

I still believe that you are giving me a good advice though that's y i am curious to know what's wrong with my code?
1 year ago

Campbell Ritchie wrote:If you don't add the panel to the frame or make the frame appear, nothing will happen.[/tt]



I SEE

Oh my word!!, how could anything appear if i do not code for showing the panel.
In main method, i need to create the JFrame with argument "MyDrawPanel"
then i need to write a vital code that causes the panel Appear right? i m talking about the the dimensions, EXIT_CLOSE instruction, setVisible

Also i need to create the Object of "MyDrawPanel" in order to be able to add it to the frame

here i am

1 year ago

Carey Brown wrote:You need a JFrame object to hold all your Swing objects, including you MyDrawPanel. You don't need to create a JPanel, that comes with Swing. The class that either extends JFrame or instantiates a JFrame must include a main() method.

It's best to post a simple self contained compilable program here on this website (even if it's not working as desired), this will help you get the most responses.



Thanks @Carey for the response. after reading your first few lines of the response here what i came up with



Now it compiles fine but NO OUTPUT
1 year ago

Situation could be anything for example

I asked someone a question and he/she wrote the answer in code

or

I am reading some part from a codebase

or

Learning with a code example.

Regardless of how big the code i am seeing to understand, i wanna get it in my brain the right way so that i do not mess up with my head.

Where to start, what needs to be noticed, although i know that it depends on the code but i m looking for a general thought process that should occur when looking at it and try to get it.

Also this is my second day hanging around here and i started to feel that i have come to exactly where i wanted to be. THANK YOU KATHY FOR MAKING THIS FANTASTIC COMMUNITY, IT REALLY HELPS THANKS A LOT
1 year ago
Hello my Dear Friend,

I just created this account earlier, hope i will learn from some fantastic java developers

I am on chapter 12 of Head First Java Second edition


I wrote this code in my notepad file and saved it as MyDrawPanel.java
it coudn't compile

as far as i am concerned there are few reasons causing this problem
1) my program doesnt have main method, but even when i put the main method, it compiles just fine but DOES NOT PRINT WHAT I INSTRUCTED IT TO.
2) since i write that MyDrawPanel extends JPanel, it might means that i should write the JPanel class first because MyDrawPanel is just the subclass of JPanel. I hope you are getting me here.
i think i am not paying attention to the logic of super and subclass and how to run them
1 year ago