且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

什么是<>和< T>的用途是什么

更新时间:2022-02-27 05:11:34



如果您询问< T> & <>为此,

我们在这里使用< t>即此处使用的< t>为了实现通用目的,在这里您可以传递任何类型的参数,函数即返回类型,没有限制应使用特定类型的参数,可以传递任何通用类型的参数.

希望这对您有帮助...


if you asking about <T> & <> for this,

we have use here <t> i.e. here used <t> for the Generic Purpose,here you can pass any type of parametor ,funtions i.e. return type of function ,there is no restrictions that you should use specific type of parametor,you can pass any generic type of parametor.

hope this will help you...


朋友,

它的用途更多,但这是您的摘录,

您应该了解,单个&运算符通常用于按位与"运算:
例如;
hi friend,

Its uses more, but here is a snippet for you,

you should understand that the single ampersand operator is normally used for a ''bitwise AND'' operation:
For example;
(6 &amp; 2) = 2
(10 & 5) = 0
(20 & 25) = 16
(123 & 20) = 16



最终结果是:

比较其中每个的二进制表示.



final result is:

Compare the binary representations of each of those.

 110 &     010 =     010
   1010 &    0101 =    0000
  10100 &   11001 =   10000
1111011 & 0010100 = 0010000


在每种情况下,仅当输入的左右两侧均为1时,结果中的数字才为1.

问候
sarva


In each case, a digit is 1 in the result only when it is 1 on both the left AND right side of the input.

regards
sarva


这些是泛型中使用的模板占位符 [ ^ ].