<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    blogjava's web log

    blogjava's web log
    ...

    面試題.net的


    A) In VB.Net, what is the method that is available without creating the instance of the class

    · 1. Instance method
    · 2. overloading method
    · 3. Shared method
    · 4. class methods

    Ans: ? 3 ??

    B) In VB.Net, what is finalise method and what are the role of it?
    · 1. Release object memory
    · 2. Release memory
    · 3. it calls when page is closed

    Ans: ?? 1 ?

    C) In VB.Net, passing an array using ByRef or ByVal makes a difference if you use a ReDim statement inside the called procedure.? Which array size will be affected ?
    · 1. an array passed by ByVal
    · 2. an array passed by ByRef
    · 3. both affected
    · 4. none affected

    Ans: ??? 3

    D) In VB.Net, ParamArray arguments are passed by in a function?
    · 1. Always by value
    · 2. Always by reference
    · 3. both
    · 4. none

    Ans: ? 2 ??

    E) How are parameters referenced by default in VB.Net?
    · 1. ByObject
    · 2. ByVal
    · 3. ByRef
    · 4. None

    Ans: ?? 2 ?

    F) Does ISDBNull() exsist in VB.Net?
    Select Answer:
    · 1. True ????? ?????? 2. False

    Ans: ? 1 ??

    G) In VB.Net, constructor is always
    · 1. sub new()
    · 2. constructor()
    · 3. base class()
    · 4. the class name itself

    Ans: ?? 1 ?

    H) In VB.NET, what is used to join strings
    · 1. Plus sign
    · 2. Ampersand
    · 3. both

    Ans: ?? 3 ?

    ?

    I) In Java, which statements ARE true?

    1.?????? When a thread sleeps, its locks are released

    2.?????? If a class has synchronized code, multiple threads can still access the non synchronized code.

    3.?????? Methods and variables can be protected from concurrent access problems by marking them with the synchronized keyword.

    4.?????? When a thread invokes wait(), its locks are released.

    5.?????? A static method cannot be synchronized

    Ans: ??? 2

    ?

    J) Which TWO combinations below consist (and only) the necessary classes in package java.io to read a single line of Traditional Chinese text via TCP connections?

    ? I. Socket

    ? II. TCPSocket

    ? III. PipedInputStream

    ? IV. BufferedInputStream

    ? V. BufferedReader

    ? VI. InputStreamReader

    ? VII. LineNumberReader

    ? VIII. StringReader

    ?

    1.?????? (I) + (III) + (VI) + (VII)

    2.?????? (I) + (IV) + (VI) + (V)

    3.?????? (II) + (VI) + (VII)

    4.?????? (I) + (IV) + (VI) + (VII)

    5.?????? (I) + (VI) + (VIII)

    Ans: ?? 2 ?


    ?

    Question 1

    ?

    The VB function, GetCurrencyCode demonstrates the translation between the currency code and currency number. ?However, the performance of this function is not good enough; the higher order of input number takes much more times to calculate. ?Please suggest a way to improve the program performance:

    ?

    Function GetCurrencyCode(ByVal input As String) As String

    If input = "01" Then

    return = "AFA"

    ElseIf input = "02" Then

    return = "ALL"

    ElseIf input = "03" Then

    return = "DZD"

    ElseIf input = "04" Then

    return = "USD"

    ElseIf input = "05" Then

    return = "HKD"

    ElseIf input = "75" Then

    return = "EUR"

    ElseIf input = "76" Then

    return = "XCD"

    ElseIf input = "77" Then

    return = "AMD"

    End If

    End Function

    ?

    Answer:

    ?


    Question 2

    ?

    Write a function that reverses the order of the words in a string. For instance, your function should transform the string “Do or do not, there is no try.” To “try. No is there not, do or Do”. Assume that all words are space delimited and treat punctuation the same as letters.

    ?

    Use your most hands-on programming language.

    ?

    Answer:

    ?


    Question 3

    ?

    Study the following VB program:

    ?

    Imports System

    Imports System.IO

    Module Module1

    Public ArtList As ArrayList

    End Module

    ?

    Public Class Form1

    Inherits System.Windows.Forms.Form

    ?

    #Region " Windows Form Designer generated code "

    #EndRegion

    ?

    <[Serializable]()> PublicClass Art

    Public Title AsString

    Public Des AsString

    Public Value AsInteger

    Public Price AsDouble

    Public Picture AsString

    End Class

    ?

    Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim myArt AsNewObject

    Dim hashtable AsNew Collections.Hashtable

    Dim key AsString

    ?

    Try

    myArt = New Art

    With myArt

    .Title = "Title"

    .Des = "Desc"

    .Value = 123

    .Price = 321.05

    End With

    key = myArt.Title & myArt.Des & CStr(myArt.Value) & CStr(myArt.Price)

    hashtable.Add(key, myArt)

    ArtList.Add(myArt)

    ?

    Catch ex As Exception 'This is the line 94’

    MsgBox(ex.Message & vbCrLf & ex.StackTrace)

    End Try

    End Sub

    End Class

    A form is created on which a button control is placed. ?When the Button1_Click is fired, a message box is popup:

    ?(圖片未上傳)

    ?

    What is the problem and how to fix it?

    ?

    Answer:

    ?


    Question 4

    ?

    In the following VB program, please states any potential problem(s) and how to correct.

    ?

    Private Sub btnCalc_Click( )

    Dim result As Integer

    Try

    Me.Cursor = Windows.Forms.Cursors.WaitCursor

    result = Convert.ToInt32(txtInput1.Text) / Convert.ToInt32(txtInput2.Text)

    txtResult.Text = result

    Me.Cursor = Windows.Forms.Cursors.Default

    Catch ex As Exception

    MsgBox(ex.StackTrace)

    Catch ex As ArgumentNullException

    MsgBox("Input Test box cannot be null.")

    Catch ex As OverflowException

    MsgBox("Input Test box 2 cannot be zero!")

    Catch ex As FormatException

    MsgBox("Input Test box should be numeric format!")

    End Try

    End Sub

    ?

    Answer:

    ?


    Question 5

    ?

    GetRecordset() is a VB function that returns a ADODB.Recordset object:

    ?

    ??????

    Ref_ID

    Qty

    Price

    Row 0

    00123

    1000

    60.50

    Row 1

    00123

    2000

    60.00

    Row 2

    00123

    3500

    59.50

    Row 3

    00124

    3000

    60.50

    Row 4

    00125

    2000

    59.50

    Row 5

    00125

    1000

    58.00

    ?

    ?(This recordset is sorted by Ref_ID)

    ?

    The following program

    ?

    Dim rst as ADODB.Recordset

    Rst = GetRecordset

    Do While Not rst.EOF

    Console.writeline(rst.Fields("Ref_ID") & vbcrlf & rst.Fields(" Qty ") & vbcrlf & rst.Fields(" Price "))

    rst.MoveNext()

    Loop

    ?

    Can generate the following output:

    ?

    Output:

    ?

    00123 1000 60.50

    00123 2000 60.00

    00123 3500 59.50

    00124 3000 60.50

    00125 2000 59.50

    00125 1000 58.00

    ?

    Please suggest how to modify the above program to generate the following output:

    ?

    Output:

    00123

    1000 ?? ?????? 60.50

    2000 ?? ?????? 60.00

    3500??????????? 59.50

    ---- ??????????? -----

    6500??????????? 60.00

    00124

    3000??????????? 60.50

    ---- ??????????? -----

    3000 ?? ?????? 60.50

    00125

    2000???? ?????? 59.50

    1000???? ?????? 58.00

    ---- ??????????? -----

    3000???? ?????? 58.75

    ?

    ?

    Answer:

    ?


    Question 6

    ?

    Problem: Use your most hands-on programming language to implement a function that prints all possible combinations of the characters in a string. These combinations range in length from one to the length of the string. Two combinations that differ only in ordering of the characters ARE the same combination.? In other words, “12” and “31” are different combinations from the input string “123”, but “21 is the same as “12”.

    ?

    For example, if we use “wxyz” as parameter for Combination(“wxyz”) the function will print out

    ?

    w

    x

    y

    z

    wx

    wy

    wz

    xy

    xz

    yz

    wxy

    wxz

    wyz

    xyz

    wxyz

    ?

    Answer:

    ?


    Question 7

    ?

    Module modFree

    #Region "clsShape"

    Public Class clsShape

    Private m_Area As Double

    Private m_Sides As Integer

    ?

    Public Sub New()

    m_Area = 0.0

    m_Sides = 0

    End Sub

    ?

    Public Sub New(ByVal Sides As Integer)

    m_Sides = Sides

    End Sub

    ?

    Public Sub New(ByVal Area As Double)

    m_Area = Area

    End Sub

    ?

    Public Sub New(ByVal Area As Double, ByVal Sides As Integer)

    m_Area = Area

    m_Sides = Sides

    End Sub

    ?

    Public Property Area() As Double

    Get

    Return m_Area

    End Get

    Set(ByVal Value As Double)

    m_Area = Value

    End Set

    End Property

    ?

    Public Property Sides() As Integer

    Get

    Return m_Sides

    End Get

    Set(ByVal Value As Integer)

    m_Sides = Value

    End Set

    End Property

    End Class

    #End Region

    ?

    ?

    #Region "clsTriangle"

    Public Class clsTriangle

    Inherits clsShape

    ?

    Public Sub New()

    MyBase.New(3)

    End Sub

    ?

    Public Sub New(ByVal Area As Double)

    MyBase.New(Area, 3)

    End Sub

    ?

    Public Function CalculateArea(ByVal SideBase As Double, ByVal Height As Double, _ Optional ByVal AssignToArea As Boolean = False) As Double

    Dim Area As Double = (SideBase * Height) / 2

    ?

    If AssignToArea Then

    Me.Area = Area

    End If

    ?

    Return Area

    End Function

    End Class

    #End Region

    ?

    Public Sub Main()

    Dim objTriangle As New clsTriangle

    Dim objShape As New clsShape

    ?

    objTriangle.Area = -330

    objTriangle.Sides = 5.5

    objTriangle.CalculateArea(10.0, 2.5)

    ?

    objShape.Area = 123

    objShape.Sides = -2

    objShape = CType(objShape, clsTriangle)

    ?

    Console.WriteLine(TypeOf objTriangle Is clsShape)

    Console.WriteLine(TypeOf objShape Is clsTriangle)

    Console.WriteLine(objTriangle.Area)

    End Sub

    End Module

    ?

    7.1 Please find the line of code from the procedure Main to cause run-time error.

    ?

    Answer:

    ?

    7.2 Please write the result output from the procedure Main.

    ?

    Answer:

    ?


    Question 8

    ?

    Consider the following account and customer tables:

    ?

    cust_tbl

    cust_id

    title

    e_first_name

    e_last_name

    address1

    .

    0

    MR

    Martin

    Ma

    .

    ?

    1

    MR

    Kirs

    Cheung

    .

    ?

    2

    MR

    Ricky

    Chan

    .

    ?

    3

    MR

    Tom

    Kwan

    .

    ?

    4

    MR

    Corporate Default

    Corporate Default

    .

    ?

    5

    MRS

    Mary

    Mok

    .

    ?

    .

    .

    .

    .

    .

    ?

    ?

    acc_grp_cust_tbl

    acc_group

    Cust_id1

    Cust_id2

    Cust_id3

    Cust_id4

    1400

    0

    1

    2

    ?

    1500

    3

    4

    ?

    ?

    1600

    5

    ?

    ?

    ?

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    ?

    The acc_grp_cust_tbl table is responsible to store the customer ID, and the cust_tbl table is responsible to store customer personal information such as name, address, etc… Please write a SQL query in order to provide following result.

    ?

    ACC_GROUP

    PAYEENAMES

    1400

    Ma Martin/Cheung Kris/Chan Ricky

    1500

    Kwan Tom/Corporate Default Corporate Default

    1600

    Mok Mary

    .

    .

    .

    .

    ?

    Answer:

    ?


    posted on 2006-06-04 11:37 record java and net 閱讀(1419) 評論(3)  編輯  收藏 所屬分類: dot net相關

    評論

    # re: 第一輪面試題,搞.net的 2006-07-17 12:01 牛哥

    呵呵!有同感??!我直接放棄了!不想去了,想想以后還要去做VB。NET  回復  更多評論   

    # re: 第一輪面試題,搞.net的 2006-08-30 21:40

    第一題就答錯了,和java一樣是類方法!  回復  更多評論   

    # re: 第一輪面試題,搞.net的 2006-08-31 09:05 junmy

    A) In VB.Net, what is the method that is available without creating the instance of the class
    · 1. Instance method
    · 2. overloading method
    · 3. Shared method
    · 4. class methods

    這 個是類方法???


    老兄 你也太強了吧.

    3. Shared method 應該沒有錯吧.
      回復  更多評論   

    導航

    常用鏈接

    留言簿(44)

    新聞檔案

    2.動態(tài)語言

    3.工具箱

    9.文檔教程

    友情鏈接

    搜索

    最新評論

    主站蜘蛛池模板: 免费国产污网站在线观看| ww在线观视频免费观看w| 中文字幕在线观看免费视频 | 日本免费一区二区在线观看| 国产亚洲人成网站在线观看不卡 | 永久免费无码网站在线观看个| 国产精品极品美女免费观看| 亚洲AV无码一区二区乱子仑| 国产高清在线免费视频| 亚洲AV永久无码精品一福利| 国产成人综合久久精品免费| 黄色a级免费网站| 日韩精品亚洲aⅴ在线影院| 黄网站免费在线观看| 亚洲一区免费观看| 久久久无码精品亚洲日韩软件| 亚洲成a人片在线观看中文!!! | 亚洲美女高清一区二区三区| 亚洲av产在线精品亚洲第一站| 中文精品人人永久免费 | 日本特黄特黄刺激大片免费| 国产精品亚洲专区一区| 亚洲高清无码专区视频| 在线成人精品国产区免费| 亚洲第一成年人网站| 波多野结衣久久高清免费| 一个人看的www免费在线视频 | 亚洲性一级理论片在线观看| 男女超爽刺激视频免费播放 | 国产成人综合久久精品免费| 国产三级在线免费观看| 亚洲国产精品日韩| 免费av片在线观看网站| 国产 亚洲 中文在线 字幕| AV在线亚洲男人的天堂 | 日韩高清免费观看| 99精品免费视品| 亚洲色大情网站www| 国产AⅤ无码专区亚洲AV| 国色精品卡一卡2卡3卡4卡免费| 国产91成人精品亚洲精品|