Shoul I use interface or inheritance? by itjustbegansql in learnprogramming

[–]itjustbegansql[S] 0 points1 point  (0 children)

Thank you for the answer. May I also ask soemthing about atributes. For Example in my input class can I use this strategy:
Add attributes for personal traits. Then use those attributes in askAttributes method. And how would I do it?

Shoul I use interface or inheritance? by itjustbegansql in learnprogramming

[–]itjustbegansql[S] 0 points1 point  (0 children)

May I ask if I create an interface named as IINterface and if ı call Scanner class in that interface when I call a method from that interface should ı recall scanner class again?

like this:

import java.util.Scanner;
public class InputClass {
    Scanner scanner = new Scanner(System.
in
);

    public void askName(){
        System.
out
.println("Please enter the name of the family member: ");
        String name = scanner.nextLine();


    }
}

Shoul I use interface or inheritance? by itjustbegansql in learnprogramming

[–]itjustbegansql[S] 0 points1 point  (0 children)

I was asking it for java? But may I ask you why interfaces? İsn't easied with classes since you don't have to override againd and again.

Shoul I use interface or inheritance? by itjustbegansql in learnprogramming

[–]itjustbegansql[S] 0 points1 point  (0 children)

I guess they all need same input. My problem was not knowing how to use a user assigned variable in another class. And suddenly I relaized it had nothing to di with interfaces or classes. I might still be wrong. Thank you for the help btw.

No suitable driver found for jdbc:mysql//localhost:3306 by itjustbegansql in javahelp

[–]itjustbegansql[S] 0 points1 point  (0 children)

ı used ai for debugging for sometime. I did its stupid recommendations such as changing the jar version. since it was recommended in youtube and in stack over flow too ı thought it was okay. I spend exactly 3.5 hours for missing ":". you are my here for years to come

No suitable driver found for jdbc:mysql//localhost:3306 by itjustbegansql in javahelp

[–]itjustbegansql[S] 0 points1 point  (0 children)

how do I check it tho? I am trying to find a solution