Questions tagged «instantiation»

30
ජාවා හි සාමාන්‍ය අරාවක් නිර්මාණය කරන්නේ කෙසේද?
ජාවා ජනක විද්‍යාව ක්‍රියාත්මක කිරීම නිසා ඔබට මෙවැනි කේතයක් තිබිය නොහැක: public class GenSet<E> { private E a[]; public GenSet() { a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation } } වර්ගයේ ආරක්ෂාව පවත්වා ගනිමින් මෙය ක්‍රියාත්මක කරන්නේ කෙසේද? ජාවා සංසදවල මෙවැනි විසඳුමක් මම දුටුවෙමි: import java.lang.reflect.Array; class Stack<T> …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.