<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 閱讀(1425) 評論(3)  編輯  收藏 所屬分類: dot net相關(guān)

    評論

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

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

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

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

    # 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 應(yīng)該沒有錯吧.
      回復(fù)  更多評論   

    導(dǎo)航

    常用鏈接

    留言簿(44)

    新聞檔案

    2.動態(tài)語言

    3.工具箱

    9.文檔教程

    友情鏈接

    搜索

    最新評論

    主站蜘蛛池模板: 无码免费又爽又高潮喷水的视频 | 大片免费观看92在线视频线视频| 我们的2018在线观看免费高清| 亚洲av永久无码精品国产精品| aa毛片免费全部播放完整| 久久久久亚洲av毛片大| 一级毛片在线免费播放| 老司机亚洲精品影视www| 中文字幕在线免费视频| 自拍偷自拍亚洲精品第1页| GOGOGO免费观看国语| 亚洲AV永久无码区成人网站| 91视频精品全国免费观看| 国产亚洲人成网站观看| 99视频在线免费| 亚洲精品视频在线免费| AA免费观看的1000部电影| 亚洲精品无码不卡在线播放| 无码一区二区三区免费| 亚洲激情在线视频| 国产精品亚洲四区在线观看| 91视频国产免费| 羞羞的视频在线免费观看| 亚洲А∨精品天堂在线| 国产一级在线免费观看| 久久亚洲国产精品五月天| 天天影视色香欲综合免费| 亚洲国产区男人本色| 亚洲男人的天堂一区二区| aaa毛片免费观看| 亚洲精品在线播放| 国产成人免费a在线资源| 久久国产免费直播| 中文字幕亚洲精品资源网| 最近2019中文免费字幕| 一级视频免费观看| 亚洲色图黄色小说| 亚洲?V乱码久久精品蜜桃 | 国产白丝无码免费视频| 亚洲AV无码乱码在线观看代蜜桃| 九月婷婷亚洲综合在线 |