Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8462171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:05:41+00:00 2026-06-10T14:05:41+00:00

I just created a class like this: NameOfTheClass<Raeaeraear> . What does it means? And

  • 0

I just created a class like this: NameOfTheClass<Raeaeraear>. What does it means? And why can I put whatever random stuff I want?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:05:42+00:00Added an answer on June 10, 2026 at 2:05 pm

    That is called Generics. Generics is used to “tell” a instance of an class what kind of type it is going to work with, take f.ex a List

    List<People> myPeopleList = new ArrayList<People>(); 
    

    Here the list is parameterized. If you take a look at the List-interface source code, it is declared like this which means the interface List is generic.

    public interface List<E> extends Collection<E> {
    ...
    

    In your case the class NameOfTheClass would be implementet somewhat like this, Note: Generics can be applied to both a Class or an Interface.

    public class NameOfTheClass<E> {
    ....
    public doSome(E e){
        doSomeGenericOperationWith(e);
    }
    

    This class could be used like this:

    NameOfTheClass<AType> instance = new NameOfTheClass<AType>();
    Atype yourType = ...
    doSome(yourType);
    

    Note: Any use of the doSome()-method will require a parameter of type Atype, this will be handled by the Java-compiler. So if you try to call the method with some other type, an compile-error will rise.

    More readings : http://docs.oracle.com/javase/tutorial/java/generics/why.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a simple class and got a little problem: I just want to
I've created a custom view class and right now just want to draw an
I have created a type like this: TypeBuilder tb = moduleBuilder.DefineType(myname, TypeAttributes.Class | TypeAttributes.Public,
I have created MutexCondition class like this /*MutexCondtion.h file*/ #ifndef MUTEXCONDITION_H_ #define MUTEXCONDITION_H_ #include
I created class inherited from DataTable. I want to Expose the items like Name
I just created a project so my Solution Explorer looks like this: (source: kalleload.net
I've created a Person class and my code is correct, but I just wanted
Just created an acc on SO to ask this :) Assuming this simplified example:
Let's say you have a JavaScript class like this var DepartmentFactory = function(data) {
I have a class here that is defined like this: struct USERFPOINT { POINTFLOAT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.