Questions tagged [language-concepts]

Use this tag to ask about how a particular idea (arrays, lists, tables, search, sort) is implemented in language X or how to understand a basic part of the language.

Often there is a particular concept that isn't quite grouped into any of the other tags, or it is just too embarrassing because it's a "newbie" idea. Or there isn't a concrete problem to solve and you were just wondering about how something works in language X.

If you wanted to ask about which version of the moot() function is used if class A is inherited from class B and implements C, tag it with inheritance..

But also use this tag to point out it's more of a "Hmm..." question than a "How do I solve this" question.

98 questions
-1
votes
1 answer

Among regular and context-free grammars which one is more powerful. Please give me the reason too

I was just going through the principles of programming languages. I know the concepts of regular and context-free grammars and their usage. But still I am unable to decide which one is more powerful and why. Please help Thanks in advance.
-2
votes
1 answer

How do you 'catch' Email addresses inside a log file?

''' This program is to read through any number of inputs (that is only: .txt files) the user passes through the sys.argv (through the terminal only). The file should only be a .txt file. Which means there is a conditional. Then the program should…
JoelFU
  • 3
  • 3
-2
votes
1 answer

Array Operation in Kotlin

The question I want to ask is about programming related question in kotlin. This question may seem really bad , but I can't think how to handle this situation. val array = ArrayList>() val subAnswer =…
Daniel Jr McCoy
  • 157
  • 1
  • 15
-2
votes
1 answer

C++ OOP Basic Concept - Passing parameters to constructors

I don't understand what must be a basic C++ concept related to function parameters. It would really help me if someone could identify what is the concept I'm missing - I'd like to study it in order to deeply understand what's happening. Consider the…
SOFaccount
  • 11
  • 2
-2
votes
3 answers

Java: HashSet what is the Compare concept?

Coming from a c++ world, I find reading of the HashSet documentation somewhat hard: https://docs.oracle.com/javase/7/docs/api/java/util/HashSet.html In c++, you would have: http://en.cppreference.com/w/cpp/container/set which in turns points…
malat
  • 12,152
  • 13
  • 89
  • 158
-3
votes
1 answer

Use a math result as a variable

I am creating a POS system (Point of Sale system) using batch code. It is all going great, but i am trying to multiply two variables (Quantity of the product) by a set number (the price of the product) and send the output to a separate file, which…
-4
votes
1 answer

Why is possible to concatenate Char and String in Java?

this is what I've tried; public String frontBack(String str) { char begin = str.charAt(0); char end = str.charAt(str.length()-1); return begin+str.substring(1,str.length()-1)+end; } I've thought it would fail since begin and end…
GniruT
  • 731
  • 1
  • 6
  • 14
-5
votes
1 answer

Why does the value of i not increment for i=i++; statement?

Code: for(int i=0;i<5;){ i=i++; printf("%d",i); } The above program print zeros infinitely, How is that possible? There is the statement i=i++;. Please explain why the value of i do not increment.
1 2 3 4 5 6
7