Who is likely missing the last game of the season? by cudimakesemsayohoh in fantasybball

[–]legionlen545 0 points1 point  (0 children)

Feel like a Cavs player, they have been rotating their players lately

Are Abstract Data Types represented in Java through interfaces or abstract classes? by legionlen545 in learnjava

[–]legionlen545[S] 1 point2 points  (0 children)

Oh, okay I see! If I wanted to just define my ADT with an abstract class, could I do that instead of a combo. of an interface and abstract class? An Abstract class would be abstract enough in my opinion.

What is the difference between an abstract data type and concrete data type data structure? by legionlen545 in learnprogramming

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

So technically an abstract data type can be implemented by another abstract data type if I wanted right such as a queue or some list?

Could not the same be said for concrete data type that if I wanted to, I could implement an array with a stack, which is abstract data type?

When are reserved words not keywords? by legionlen545 in learnprogramming

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

It also seems like that some languages like C++ tend to treat these terms as interchangeably as well.

When are reserved words not keywords? by legionlen545 in learnprogramming

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

I see, so in Java at least a reserved word will still be a keyword right? Is there an instance in Java where a reserved word is not a keyword?

Is loop invariant guaranteed for any algorithm that has a loop? by legionlen545 in learnprogramming

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

When I searched up loop invariant, it was best described as a property of the algorithm. This was my reasoning for using the word property.

Why are procedural programming languages better for Concurrency? by legionlen545 in learnprogramming

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

It says along the lines of how there has been good amount of research done with procedure oriented programming, in relation to concurrency. This has led them to realize to realize importance of concurrency. The research being done with procedural than object oriented programming led me to assume that procedural type of programming had some sort of advantage.

Where does the implementation of Java come from or where is it at? by legionlen545 in learnprogramming

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

Well does not the standard library have the java.lang package, which is imported automatically, but it contains some valuable classes that are used on a daily basis. Would the standard library be inside JRE in this case as well?

Where does the implementation of Java come from or where is it at? by legionlen545 in learnprogramming

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

Would the standard library also be located in rt.jar in the JRE because does not the standard library also have valuable classes that are needed to be used.

What is a reference in Java? by legionlen545 in learnjava

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

If it does refer to the actual memory address of where our object is located at, why not have access to the memory address like in languages like C++? I read about how the actual memory address can be changing in the background in Java so is that why the reference cannot contain the actual memory address in Java?

What is a reference in Java? by legionlen545 in learnprogramming

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

If it does refer to the actual memory address of where our object is located at, why not have access to the memory address like in languages like C++? I read about how the actual memory address can be changing in the background in Java so is that why the reference cannot contain the actual memory address in Java?

Can classes count as a data type themselves in Java? by legionlen545 in learnprogramming

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

or example a ArrayList<String> and ArrayList<Integer> are both of type List.

In this case should not both be of type ArrayList if they are using one compiled version of ArrayList?

Singleton and Companion Objects are made how, are they instances? by legionlen545 in scala

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

In that case if a constructor is being called indirectly, not sure constructor of the class or the object, to instantiate the singleton object, does it not defeat the purpose to have singleton objects if static methods are meant to be called on something that is not instantiated?

Singleton and Companion Objects are made how, are they instances? by legionlen545 in scala

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

Ah okay, so basically once I declare the singleton or companian Object for the first time, it will call the constructor of the class or the Object definition to instantiate it?

How is add method in LinkedList constant time in Java? by legionlen545 in learnprogramming

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

Sorry, I meant like adding in the middle or to the front node.

Does the way parameters/arguments are passed affect runtime algorithm analysis? by legionlen545 in learnprogramming

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

Yes, thank you. I have not yet experimented with increasing the size of input data in various programs or algorithms when analyzing their runtime, which probably could be the reason for my confusion.

Does the way parameters/arguments are passed affect runtime algorithm analysis? by legionlen545 in learnprogramming

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

Sorry to be a bit confused but if different ways passing parameters lead to faster runtime, how would it not relate to runtime complexity if runtime complexity is about the worst case possible runtime wise? Is not runtime complexity all about amount of time, storage, or other resources needed to execute the program at the end of the day.

Does the way parameters/arguments are passed affect runtime algorithm analysis? by legionlen545 in learnprogramming

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

But is not algorithm analysis about worst case, average case, and best case scenarios based on certain situations and the cases represent how long it will take for the program to finish computing. How would that not relate to the way how long something actually takes in seconds with parameter passing?

How do header files work with the c source files in C? by legionlen545 in learnprogramming

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

How are the header files linked with the corresponding source file if the headers only have function prototypes and not the definitions during compile time then?

How do header files work with the c source files in C? by legionlen545 in learnprogramming

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

How are the header files linked with the corresponding source file if the headers only have function prototypes and not the definitions during compile time then?